StreamLink for iOS
8.0.2.287281-045ba3c8
|
Represents the StreamLink instance. More...
Instance Methods | |
(void) | - connect |
Connect this StreamLink instance to the Liberator. More... | |
(void) | - disconnect |
Disconnect this StreamLink instance from the Liberator. More... | |
(id< SLParametersFactory >) | - parametersFactory |
Returns a factory for creating SLSubscriptionParameters objects. More... | |
(void) | - addConnectionListener: |
Register a connection listener with this StreamLink instance. More... | |
(void) | - removeConnectionListener: |
Deregister a connection listener from this StreamLink instance. More... | |
(id< SLSubscription >) | - subscribeToSubject:subscriptionParameters:subscriptionListener: |
Subscribe to a subject. More... | |
(void) | - snapshotSubject:subscriptionParameters:subscriptionListener: |
Snapshot a subject. More... | |
(void) | - publishToSubject:fieldValues:commandListener: |
Publish a set of field-value pairs to a subject. More... | |
(void) | - publishToSubject:fieldValueList:commandListener: |
Publish a set of field-value pairs to a subject. More... | |
(id< SLCommandSubscription >) | - publishToSubject:fieldValues:commandListener:persistence: |
Publish a set of field-value pairs to a subject. More... | |
(id< SLCommandSubscription >) | - publishToSubject:fieldValueList:commandListener:persistence: |
Publish a list of field-value pairs to a subject. More... | |
(void) | - deleteSubject:commandListener: |
Delete a subject from the Liberator. More... | |
(void) | - throttleSubject:withControl:commandListener: |
Change the throttle level of updates received from the Liberator for a given subscribed subject. More... | |
(void) | - globalThrottleWithControl:commandListener: |
Change the throttle level of updates received from the Liberator for all subscribed subjects. More... | |
(void) | - createSubject:withType:commandListener: |
Create a subject on the Liberator. More... | |
(id< SLLogger >) | - logger |
Returns the SLLogger that logs StreamLink messages. More... | |
(void) | - setLogger: |
Set the logger for logging StreamLink messages. More... | |
(void) | - setRunning: |
Set the running state of the streamlink instance. More... | |
(BOOL) | - running |
Returns the current running state of the StreamLink instance; true if StreamLink is currently enabled to return streaming data, and false if streaming is suspended. More... | |
(id< SLCredentialsProvider >) | - credentialsProvider |
Gets the SLCredentialsProvider that is used to provide user's credentials. More... | |
(NSString *) | - version |
Returns the version of StreamLink for iOS in the form: major.minor.patch-build. More... | |
(NSURLRequest *) | - requestForService:withParameters: |
(void) | - setTrustManager: |
Set a block that can be used to validate the SSL certificate. More... | |
(id< SLChannel >) | - createChannelWithSubject:channelListener: |
Creates a Channel for the specified subject on the Liberator. More... | |
Represents the StreamLink instance.
SLStreamLink instances are created via the SLStreamLinkFactory.
- (void SLStreamLink) addConnectionListener: | (id< SLConnectionListener >) | connectionListener |
Register a connection listener with this StreamLink instance.
connectionListener | - The SLConnectionListener to register. |
A SLConnectionListener allows the StreamLink application to receive notification of changes to the connection state of the StreamLink instance.
The subscriptionListener
will be retained by StreamLink for iOS.
- (void SLStreamLink) connect |
Connect this StreamLink instance to the Liberator.
When an SLConnectionListener has beeen registered with this StreamLink instance, the listener's methods are called when the status of the connection changes.
- (id<SLChannel> SLStreamLink) createChannelWithSubject: | (NSString *) | subject | |
channelListener: | (id< SLChannelListener >) | channelListener | |
Creates a Channel for the specified subject on the Liberator.
Use the returned channel to send and receive data as dictionaries 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. |
- (void SLStreamLink) createSubject: | (NSString *) | subject | |
withType: | (SL_SubjectType) | type | |
commandListener: | (id< SLCommandListener >) | commandListener | |
Create a subject on the Liberator.
subject | - The subject to create |
type | - The type of subject that should be created (for example record) |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
A subject can only be created if the StreamLink client has sufficient permission to create subjects.
- (id<SLCredentialsProvider> SLStreamLink) credentialsProvider |
Gets the SLCredentialsProvider that is used to provide user's credentials.
- (void SLStreamLink) deleteSubject: | (NSString *) | subject | |
commandListener: | (id< SLCommandListener >) | commandListener | |
Delete a subject from the Liberator.
subject | - The subject to delete |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
A subject can only be deleted if the StreamLink client has sufficient permission to delete subjects.
- (void SLStreamLink) disconnect |
Disconnect this StreamLink instance from the Liberator.
Following a call to this method, all SLSubscription and SLCommandSubscription references are invalidated and can no longer be used.
- (void SLStreamLink) globalThrottleWithControl: | (SL_ThrottleControl) | command | |
commandListener: | (id< SLCommandListener >) | commandListener | |
Change the throttle level of updates received from the Liberator for all subscribed subjects.
command | - The throttle action to perform. |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
- (id<SLLogger> SLStreamLink) logger |
Returns the SLLogger that logs StreamLink messages.
A value of nil means that no logging capability is available.
- (id<SLParametersFactory> SLStreamLink) parametersFactory |
Returns a factory for creating SLSubscriptionParameters objects.
- (void SLStreamLink) publishToSubject: | (NSString *) | subject | |
fieldValueList: | (NSArray< SLPair< NSString *, NSString * > * > *) | fieldValueList | |
commandListener: | (id< SLCommandListener >) | commandListener | |
Publish a set of field-value pairs to a subject.
subject | - Subject to publish to |
fieldValueList | - An NSArray of SLPair field-value pairs |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
An | exception will the thrown if the size of the message to publish exceeds the maximum size set by the Liberator. |
This method allows the same field to be published multiple times within a single message.
- (id<SLCommandSubscription> SLStreamLink) publishToSubject: | (NSString *) | subject | |
fieldValueList: | (NSArray< SLPair< NSString *, NSString * > * > *) | fieldValueList | |
commandListener: | (id< SLCommandListener >) | commandListener | |
persistence: | (SL_CommandPersistence) | persistence | |
Publish a list of field-value pairs to a subject.
subject | - Subject to publish to |
fieldValueList | - An NSArray of SLPair field-value pairs |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
persistence | - Whether this publish command should be persisted. |
An | exception will the thrown if the size of the message to publish exceeds the maximum size set by the Liberator. |
You should use this method if you want a publish message to be reissued whenever StreamLink logs into a Liberator server. This is useful if you send a message to the Liberator auth module to change the effective user of the connection, for example when implementing Trade On Behalf Of functionality.
This method allows the same field to be published multiple times within a single message.
- (void SLStreamLink) publishToSubject: | (NSString *) | subject | |
fieldValues: | (NSDictionary< NSString *, NSString * > *) | fieldValues | |
commandListener: | (id< SLCommandListener >) | commandListener | |
Publish a set of field-value pairs to a subject.
subject | - Subject to publish to |
fieldValues | - An NSDictionary of NSString field-value pairs |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
An | exception will the thrown if the size of the message to publish exceeds the maximum size set by the Liberator. |
- (id<SLCommandSubscription> SLStreamLink) publishToSubject: | (NSString *) | subject | |
fieldValues: | (NSDictionary< NSString *, NSString * > *) | fieldValues | |
commandListener: | (id< SLCommandListener >) | commandListener | |
persistence: | (SL_CommandPersistence) | persistence | |
Publish a set of field-value pairs to a subject.
subject | - Subject to publish to |
fieldValues | - An NSDictionary of NSString field-value pairs |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
persistence | - Whether this publish command should be persisted. |
An | exception will the thrown if the size of the message to publish exceeds the maximum size set by the Liberator. |
You should use this method if you want a publish message to be reissued whenever StreamLink logs into a Liberator server. This is useful if you send a message to the Liberator auth module to change the effective user of the connection, for example when implementing Trade On Behalf Of functionality.
- (void SLStreamLink) removeConnectionListener: | (id< SLConnectionListener >) | connectionListener |
Deregister a connection listener from this StreamLink instance.
connectionListener | - The SLConnectionListener to deregister. |
- (NSURLRequest * SLStreamLink) requestForService: | (NSString *) | service | |
withParameters: | (NSDictionary *) | parameters | |
- (BOOL SLStreamLink) running |
Returns the current running state of the StreamLink instance; true if StreamLink is currently enabled to return streaming data, and false if streaming is suspended.
- (void SLStreamLink) setLogger: | (id< SLLogger >) | logger |
Set the logger for logging StreamLink messages.
logger | - The logger that will receive log messages. |
An example logger (SLConsoleLogger) is provided; this redirects log messages to the console.
Note: the logger is retained by StreamLnk for iOS.
- (void SLStreamLink) setRunning: | (BOOL) | running |
Set the running state of the streamlink instance.
running | - The new running state, set to true to set streamlink running, false to suspend streamlink. |
This method can be used to suspend data streaming whilst the iOS device screen is switched off or when your application is suspended.
- (void SLStreamLink) setTrustManager: | (BOOL(^)(NSString *hostname, SecTrustRef serverTrust)) | evaluateTrustBlock |
Set a block that can be used to validate the SSL certificate.
This block can be used for example to implement certificate pinning.
- (void SLStreamLink) snapshotSubject: | (NSString *) | subject | |
subscriptionParameters: | (id< SLSubscriptionParameters >) | subscriptionParameters | |
subscriptionListener: | (id< SLSubscriptionListener >) | subscriptionListener | |
Snapshot a subject.
subject | - Subject to snapshot. |
subscriptionParameters | - A subscription parameters object, or nil if the subscription has no parameters. |
subscriptionListener | - The SLSubscriptionListener instance that receives updates when the contents of the subject change. |
An SLSubscriptionParameters object can be created using the SLParametersFactory.
The subscriptionListener
and subscriptionParameters
arguments will be retained by StreamLink for iOS.
- (id<SLSubscription> SLStreamLink) subscribeToSubject: | (NSString *) | subject | |
subscriptionParameters: | (id< SLSubscriptionParameters >) | subscriptionParameters | |
subscriptionListener: | (id< SLSubscriptionListener >) | subscriptionListener | |
Subscribe to a subject.
subject | - Subject to subscribe to. |
subscriptionParameters | - A subscription parameters object, or nil if the subscription has no parameters. |
subscriptionListener | - The SLSubscriptionListener instance that receives updates when the contents of the subject change. |
An SLSubscriptionParameters object can be created using the SLParametersFactory.
The subscriptionListener
and subscriptionParameters
arguments will be retained by StreamLink for iOS.
- (void SLStreamLink) throttleSubject: | (NSString *) | subject | |
withControl: | (SL_ThrottleControl) | control | |
commandListener: | (id< SLCommandListener >) | commandListener | |
Change the throttle level of updates received from the Liberator for a given subscribed subject.
subject | - The subject for which the throttle level should be changed. |
control | - The throttle action to perform. |
commandListener | - The SLCommandListener instance that receives notification of success or failure. |
- (NSString * SLStreamLink) version |
Returns the version of StreamLink for iOS in the form: major.minor.patch-build.