Represents a channel to a subject on the Liberator.
A Channel provides a bi-directional communication channel between a StreamLink application and a DataSource adapter. Using a Channel in both DataSource and StreamLink provides a simplified method of communication between the two components and can allow you just to use the Caplin platform as a bi-directional messaging pipe.
Attributes | Name and Description |
---|---|
|
caplin.streamlink.Channel()
|
Attributes | Name and Description |
---|---|
|
void
closeChannel()
* Closes the channel to the Liberator. |
|
void
getSubject()
* Returns the subject name to which the channel relates. |
|
void
send( fields, commandListener)
* Sends fields to the channel subject *@param {Object} fields the fields to send *@param {caplin.streamlink.CommandListener} commandListener optional callback for command completion (can set to null). |
|
void
sendWithFieldList( fields, commandListener)
* Sends fields to the channel subject allowing for a field to be repeatedly specified in the same message. |
►
caplin.streamlink.Channel()
►
void
closeChannel()
* Closes the channel to the Liberator. This will result in a corresponding call to onChannelClose * declared in ChannelListener on the DataSource. The delay before onChannelClose is called is defined by the * Liberator configuration item, active-discard-timeout.
►
void
getSubject()
* Returns the subject name to which the channel relates. * @returns {String} The subject of this channel.
►
void
send( fields, commandListener)
* Sends fields to the channel subject *@param {Object} fields the fields to send *@param {caplin.streamlink.CommandListener} commandListener optional callback for command completion (can set to null).
fields | ||
commandListener |
►
void
sendWithFieldList( fields, commandListener)
* Sends fields to the channel subject allowing for a field to be repeatedly specified in the same message. *@param {List} fields the fields to send. Note: for Javascript this should be a JSON object of the form * [{field1:"value1"}, {field2:"value2"}, {field3:"value3"}] *@param {caplin.streamlink.CommandListener} commandListener optional callback for command completion (can set to null).
fields | ||
commandListener |