Class
caplin.streamlink

Channel

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.

Constructor Summary

Attributes Name and Description
caplin.streamlink.Channel()

Method Summary

Attributes Name and Description
void closeChannel()

Closes the channel to the Liberator.

String getSubject()

Returns the subject name to which the channel relates.

void send(Object fields, caplin.streamlink.CommandListener commandListener)

Sends fields to the channel subject

Constructor Detail

caplin.streamlink.Channel()

Method Detail

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.

String getSubject()

Returns the subject name to which the channel relates.

Returns
{String} The subject of this channel.

void send(Object fields, caplin.streamlink.CommandListener commandListener)

Sends fields to the channel subject

Parameters
Object fields the fields to send
caplin.streamlink.CommandListener commandListener optional callback for command completion (can set to null).