StreamLink for iOS  7.1.0.313154

Represents the StreamLink instance. More...

Inheritance diagram for <SLStreamLink >:

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...
 

Detailed Description

Represents the StreamLink instance.

SLStreamLink instances are created via the SLStreamLinkFactory.

Note
All calls on this object are potentially blocking and such you should refrain from calling into StreamLink on the UI/main thread of your application to ensure that your UI remains responsive.

Method Documentation

- (void SLStreamLink) addConnectionListener: (id< SLConnectionListener >)  connectionListener

Register a connection listener with this StreamLink instance.

Parameters
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.

Parameters
subjectthe Liberator subject that will be used for this channel.
channelListenerto receive data, status and error messages from the channel.
Returns
channel object that can be used to send and receive data as a dictionary of name/value pairs.
- (void SLStreamLink) createSubject: (NSString *)  subject
withType: (SL_SubjectType type
commandListener: (id< SLCommandListener >)  commandListener 

Create a subject on the Liberator.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
subject- Subject to publish to
fieldValueList- An NSArray of SLPair field-value pairs
commandListener- The SLCommandListener instance that receives notification of success or failure.
Exceptions
Anexception 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.

Parameters
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.
Exceptions
Anexception will the thrown if the size of the message to publish exceeds the maximum size set by the Liberator.
Returns
An object that can be used to cancel the persistence for this publish command.

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.

Parameters
subject- Subject to publish to
fieldValues- An NSDictionary of NSString field-value pairs
commandListener- The SLCommandListener instance that receives notification of success or failure.
Exceptions
Anexception 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.

Parameters
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.
Exceptions
Anexception will the thrown if the size of the message to publish exceeds the maximum size set by the Liberator.
Returns
An object that can be used to cancel the persistence for this publish command.

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.

Parameters
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.

Parameters
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.

Parameters
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.

Note
Setting the running state to false will raise an SL_CONN_UNREACHABLE connection status event on any register SLConnectionListeners.
- (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.

Note
No validity checks have been performed on the supplied object
- (void SLStreamLink) snapshotSubject: (NSString *)  subject
subscriptionParameters: (id< SLSubscriptionParameters >)  subscriptionParameters
subscriptionListener: (id< SLSubscriptionListener >)  subscriptionListener 

Snapshot a subject.

Parameters
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.

Parameters
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.
Returns
An SLSubscription handle that uniquely identifies this subscription and can be used to unsubscribe.

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.

Parameters
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.


Generated on Sun Jun 9 2019 08:50:07 for StreamLink for iOS