StreamLink.NET
7.1.5-7.1.5-3946-4e293d0
|
Defines the StreamLink interface. More...
Properties | |
IAdvancedConfiguration | AdvancedConfiguration [get] |
Gets the advanced configuration for this StreamLink instance. More... | |
ReadOnlyDictionary< string, string > | CustomAttributes [get] |
Custom attributes as a read only dictionary | |
IList< ILogInfo > | LastLog [get] |
ILogger | Logger [get] |
string | Version [get] |
Defines the StreamLink interface.
You can obtain an instance of this interface by calling one of the StreamLinkFactory.Create methods on the StreamLinkFactory object.
void Caplin.StreamLink.IStreamLink.AddConnectionListener | ( | IConnectionListener | listener | ) |
Adds a connection listener with this StreamLink instance. This listener
is called whenever a connection event occurs.
listener | The IConnectionListener to be added. |
void Caplin.StreamLink.IStreamLink.Connect | ( | ) |
Instructs this StreamLink instance to attempt to connect to the Liberator.
When a IConnectionListener has been registered with this StreamLink instance, the listener's methods are called when the status of the connection changes.
IChannel Caplin.StreamLink.IStreamLink.CreateChannel | ( | string | subject, |
IChannelListener | listener, | ||
ICommandParameters | parameters | ||
) |
Creates a Channel
for the specified subject on the Liberator.
Use the returned channel to send and receive data as maps of name/value pairs.
subject | the Liberator subject that will be used for this channel. |
channelListener | to receive data, status and error messages from the channel. |
commandParameters | command parameters object that will be used on all sends to the channel, can be null. |
ICommandParameters Caplin.StreamLink.IStreamLink.CreateCommandParameters | ( | ) |
Creates a set of ICommandParameters which can be used to set a command to be persistent.
IContainerSubscriptionParameters Caplin.StreamLink.IStreamLink.CreateContainerSubscriptionParameters | ( | ) |
Creates a parameters object for a container subscription.
An IContainerSubscriptionParameters allows the container window to be set, restricting the number of elements that are subscribed to.
IFreeFormSubscriptionParameters Caplin.StreamLink.IStreamLink.CreateFreeFormSubscriptionParameters | ( | ) |
Creates a parameters object for subscriptions.
Most of the SubjectTypes supported by the Liberator can be subscribed to with parameters. A set of IFreeFormSubscriptionParameters can be used to pass parameters to subscription requests for SubjectTypes that do not have a dedicated subscription parameters implementation. At present, these would be used for News headline subject. For details on the format please consult the news filtering subsection of the StreamLink Overview document.
IJsonSubscriptionParameters Caplin.StreamLink.IStreamLink.CreateJsonSubscriptionParameters | ( | ) |
Creates a parameters object for a json subscription.
A IJsonSubscriptionParameters allows a subscription to a json subject to be restricted to filter so that they are only received when the specified condition has been met.
IRecordSubscriptionParameters Caplin.StreamLink.IStreamLink.CreateRecordSubscriptionParameters | ( | ) |
Creates a parameters object for a record subscription.
A IRecordSubscriptionParameters allows a subscription to a record subject to be restricted to a specified set of fields. It can also filter updates so that they are only received when the specified condition has been met.
ICommandSubscription Caplin.StreamLink.IStreamLink.CreateSubject | ( | string | subject, |
SubjectType | subjectType, | ||
ICommandListener | commandListener, | ||
ICommandParameters | commandParameters | ||
) |
Creates a subject on the Liberator.
subject | The name of the subject to create. |
subjectType | The type of subject to create. |
commandListener | A listener that is called to provide information about the result of the "create subject" command. |
commandParameters | Additional parameters for the command (for example to make the command persistent). |
void Caplin.StreamLink.IStreamLink.CreateSubject | ( | string | subject, |
SubjectType | subjectType, | ||
ICommandListener | commandListener | ||
) |
Creates a subject on the Liberator.
subject | The name of the subject to create. |
subjectType | The type of subject to create. |
commandListener | A listener that is called to provide information about the result of the "create subject" command. |
IWebRequestParameters Caplin.StreamLink.IStreamLink.CreateWebRequestParameters | ( | String | moduleName, |
IDictionary< String, String > | options | ||
) |
Creates a IWebRequestParameters object for the specified Liberator web module.
The returned IWebRequestParameters object contains the URL and HTTP post body that should be used to access the required web module.
The following example shows how the IWebRequestParameters can be used to obtain the response text from a web module.
moduleName | the name of the Liberator web module. |
options | a map of named options that the web module accepts. |
void Caplin.StreamLink.IStreamLink.DeleteSubject | ( | string | subject, |
ICommandListener | commandListener | ||
) |
Deletes a subject on the Liberator.
subject | The name of the subject to delete. |
commandListener | A listener that is called to provide information about the result of the "delete subject" command. |
void Caplin.StreamLink.IStreamLink.Disconnect | ( | ) |
Instructs this StreamLink instance to disconnect from the Liberator.
void Caplin.StreamLink.IStreamLink.NetworkAvailable | ( | ) |
Informs StreamLink the network is available.
void Caplin.StreamLink.IStreamLink.NetworkUnavailable | ( | ) |
Informs StreamLink the network is unavailable. If StreamLink is connected to the Liberator, it will disconnect.
void Caplin.StreamLink.IStreamLink.Pause | ( | ) |
Pauses StreamLink so it does not receive new updates from the Liberator. The KeyMaster session will be kept alive.
This method can be used as part of your application's lifecycle to conserve battery life and reduce data usage by not receiving data when your application is in the background.
ICommandSubscription Caplin.StreamLink.IStreamLink.PublishToSubject | ( | string | subject, |
IDictionary< string, string > | fieldData, | ||
ICommandListener | commandListener, | ||
ICommandParameters | commandParameters | ||
) |
Publishes data to a subject.
subject | The subject to publish to. |
fieldData | The data, as key-value pairs, to be published to the subject. TO allo |
commandListener | A listener that receives notification of the publish command's success or failure. |
commandParameters | Additional parameters for the command (for example to make the command persistent). |
ICommandSubscription Caplin.StreamLink.IStreamLink.PublishToSubject | ( | string | subject, |
List< Caplin.StreamLink.STuple > | fieldData, | ||
ICommandListener | commandListener, | ||
ICommandParameters | commandParameters | ||
) |
Publishes data to a subject.
subject | The subject to publish to. |
fieldData | The data, as a list of key-value pairs, to be published to the subject. The list allows for multiple values for the same key to be sent |
commandListener | A listener that receives notification of the publish command's success or failure. |
commandParameters | Additional parameters for the command (for example to make the command persistent). |
void Caplin.StreamLink.IStreamLink.PublishToSubject | ( | string | subject, |
IDictionary< string, string > | fieldData, | ||
ICommandListener | commandListener | ||
) |
Publishes data to a subject.
subject | The subject to publish to. |
fieldData | The data, as key-value pairs, to be published to the subject. |
commandListener | A listener that receives notification of the publish command's success or failure. |
void Caplin.StreamLink.IStreamLink.PublishToSubject | ( | string | subject, |
List< Caplin.StreamLink.STuple > | fieldData, | ||
ICommandListener | commandListener | ||
) |
Publishes data to a subject.
subject | The subject to publish to. |
fieldData | The data, as a list of key-value pairs, to be published to the subject. |
commandListener | A listener that receives notification of the publish command's success or failure. |
void Caplin.StreamLink.IStreamLink.RemoveConnectionListener | ( | IConnectionListener | listener | ) |
Removes a previously added listener
from this StreamLink instance. After removal, no further callbacks are received by this listener
.
listener | The IConnectionListener to remove. |
void Caplin.StreamLink.IStreamLink.Resume | ( | ) |
Re-establishes the connection to the Liberator to receive updates.
This method can be used as part of your application's lifecycle to conserve battery life and reduce data usage by not receiving data when your application is in the background.
void Caplin.StreamLink.IStreamLink.Snapshot | ( | string | subject, |
ISubscriptionListener | subscriptionListener, | ||
ISubscriptionParameters | subscriptionParameters | ||
) |
Requests a single update from a subject.
subject | The subject to subscribe to. |
subscriptionListener | A listener that is called to provide information about the result of the subscription request, the subscribed data. |
subscriptionParameters | A set of parameters for this subscription. |
A ISubscriptionParameters object can be obtained by calling one of the following methods:
void Caplin.StreamLink.IStreamLink.Snapshot | ( | string | subject, |
ISubscriptionListener | subscriptionListener | ||
) |
Requests a single update from a subject.
subject | The subject to subscribe to. |
subscriptionListener | A listener that is called to provide information about the result of the subscription request, the subscribed data. |
ISubscription Caplin.StreamLink.IStreamLink.Subscribe | ( | string | subject, |
ISubscriptionListener | subscriptionListener, | ||
ISubscriptionParameters | subscriptionParameters | ||
) |
Subscribes to a subject to receive updates.
subject | The subject to subscribe to. |
subscriptionListener | A listener that is called to provide information about the result of the subscription request, the subscribed data, and subsequent updates to that data. |
subscriptionParameters | A set of parameters for this subscription. |
A ISubscriptionParameters object can be obtained by calling one of the following methods:
ISubscription Caplin.StreamLink.IStreamLink.Subscribe | ( | string | subject, |
ISubscriptionListener | subscriptionListener | ||
) |
Subscribes to a subject to receive updates.
subject | The subject to subscribe to. |
subscriptionListener | A listener that is called to provide information about the result of the subscription request, the subscribed data, and subsequent updates to that data. |
ICommandSubscription Caplin.StreamLink.IStreamLink.ThrottleEverything | ( | ThrottleCommand | command, |
ICommandListener | commandListener, | ||
ICommandParameters | commandParameters | ||
) |
Throttles all the currently subscribed subjects, reducing the number of updates that are sent every second.
For a fuller explanation of throttling, refer to the 'Throttling' section of the document StreamLink Overview.
command | The throttle command to apply. |
commandListener | A listener that is called to provide information about the result of the throttle command. |
commandParameters | Additional parameters for the command (for example to make the command persistent). |
void Caplin.StreamLink.IStreamLink.ThrottleEverything | ( | ThrottleCommand | command, |
ICommandListener | commandListener | ||
) |
Throttles all the currently subscribed subjects, reducing the number of updates that are sent every second.
For a fuller explanation of throttling, refer to the 'Throttling' section of the document StreamLink Overview.
command | The throttle command to apply. |
listener | A listener that is called to provide information about the result of the throttle command. |
ICommandSubscription Caplin.StreamLink.IStreamLink.ThrottleSubject | ( | string | subject, |
ThrottleCommand | command, | ||
ICommandListener | commandListener, | ||
ICommandParameters | commandParameters | ||
) |
Throttles the specified subject, reducing the number of updates that are sent every second.
For a fuller explanation of throttling, refer to the 'Throttling' section of the document StreamLink Overview.
subject | The subject for which received data updates are to be throttled. |
command | The Throttle command to apply. |
commandListener | A listener that is called to provide information about the result of the throttle command. |
commandParameters | Additional parameters for the command (for example to make the command persistent). |
void Caplin.StreamLink.IStreamLink.ThrottleSubject | ( | string | subject, |
ThrottleCommand | command, | ||
ICommandListener | commandListener | ||
) |
Throttles the specified subject, reducing the number of updates that are sent every second.
For a fuller explanation of throttling, refer to the 'Throttling' section of the document StreamLink Overview.
subject | The subject for which received data updates are to be throttled. |
command | The Throttle command to apply. |
commandListener | A listener that is called to provide information about the result of the throttle command. |
|
get |
Gets the advanced configuration for this StreamLink instance.
|
get |
Returns a List containing the last "log_buffer_size" log lines written by the current StreamLink instance. If log_buffer_size is not set or less than or equal to 0 then the log buffer is disabled and this method will always return an empty array
A List containing the last "log_buffer_size" log lines written by this instance, or an empty array if "log_buffer_size" is not set
|
get |
Returns the StreamLink logger object. You can receive StreamLink log messages by adding your own ILogListener to this object.
|
get |
Gets the version of StreamLink.