Lightstreamer iOS Client 1.2.6
Native iOS Client library for Lightstreamer
Static Public Member Functions | Properties

LSConnectionInfo Class Reference

The LSConnectionInfo class collects the parameters related to a connection request to Lightstreamer Server. More...

#import <LSConnectionInfo.h>

List of all members.

Static Public Member Functions

(int) + maxConcurrentSessionsPerServer
 Returns the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port).
(void) + setMaxConcurrentSessionsPerServer:
 Sets the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port).
(LSConnectionInfo *) + connectionInfoWithPushServerURL:pushServerControlURL:user:password:adapter:
 Creates and retuns an LSConnectionInfo object with the specified connection parameters.

Properties

NSString * pushServerURL
 Lightstreamer Server URL, without the path part.
NSString * pushServerControlURL
 Lightstreamer Server URL (without the path part) to be used for control requests.
NSString * user
 User name to be supplied to the Server in the connection request.
NSString * password
 User password to be supplied to the Server in the connection request.
NSString * adapter
 ID of the Adapter Set to be used to handle all requests in the session.
BOOL streamSenseEnabled
 If YES, enables the Stream-sense feature, which means that in case a streaming connection can't ben opened it will automatically failback to polling mode.
BOOL controlLinkHandlingEnabled
 If YES, enables the automatic handling of the server address in order to bypass the load balancer server (if any) after the first connection and allow the cleanest communication possible between Lightstreamer client and server.
LSConnectionConstraintsconstraints
 Constraints to be applied on the overall data flow from the Connection.
NSTimeInterval probeTimeoutSecs
 Timeout for activity checks, expressed in seconds.
NSTimeInterval probeWarningSecs
 Timeout for activity check warnings, expressed in seconds.
NSTimeInterval keepaliveSecs
 Keepalive time requested for the stream connection, in seconds.
NSTimeInterval reconnectionTimeoutSecs
 The maximum elapsed time in seconds allowed for a successful reconnection attempt.
NSTimeInterval streamingTimeoutSecs
 The maximum elapsed time in seconds allowed for the first successful streaming connection attempt on a streaming session.
NSTimeInterval retryDelaySecs
 The number of seconds to wait since a disconnection before trying a new connection.
int contentLength
 The length to be used by the Server for the response body on a stream connection (a minimum length, however, is ensured by the server).
NSTimeInterval pollingSecs
 Time between the end of a poll connection and the start of the next one (in seconds), if polling behaviour has been specified.
NSTimeInterval pollingIdleSecs
 Maximum time the Server is allowed to wait for updates in case none are available at connection time and a poll connection has been requested.
BOOL isPolling
 If set to YES, data streaming is simulated through a smart polling mechanism, that is a sequence of synchronous connections to the Server, each of which will receive the currently available updates, or wait until one is available.
LSMaxConcurrentSessionsPerServerExceededPolicy maxConcurrentSessionsPerServerExceededPolicy
 Sets the action to take when the maximum number of streaming connections is exceeded, as specified on the maxConcurrentSessionsPerServer property.

Detailed Description

The LSConnectionInfo class collects the parameters related to a connection request to Lightstreamer Server.


Member Function Documentation

+ (LSConnectionInfo *) connectionInfoWithPushServerURL: (NSString *)  pushServerURL
pushServerControlURL: (NSString *)  pushServerControlURL
user: (NSString *)  user
password: (NSString *)  password
adapter: (NSString *)  adapter 

Creates and retuns an LSConnectionInfo object with the specified connection parameters.

Parameters:
pushServerURLLightstreamer Server URL, without the path part (i.e.: "https://push.lightstreamer.com")
pushServerControlURLLightstreamer Server URL (without the path part) to be used for control requests (i.e.: "http://push.lightstreamer.com:80"). It may differ from pushServerUrl because of the protocol. If it is nil, then pushServerURL is used.
userUser name to be supplied to the Server in the connection request.
passwordUser password to be supplied to the Server in the connection request.
adapterID of the Adapter Set to be used to handle all requests in the session. An Adapter Set defines the Metadata Adapter and one or several Data Adapters. If it is nil, the "DEFAULT" ID will be used.
Returns:
The LSConnectionInfo object.
+ (int) maxConcurrentSessionsPerServer

Returns the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port).


The default setting in 2.

+ (void) setMaxConcurrentSessionsPerServer: (int)  maxConcurrentSessionsPerServer

Sets the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port).


The change is effective immediately, but active connections that are in excess of this value won't be closed.


Property Documentation

- (NSString*) adapter [read, write, copy]

ID of the Adapter Set to be used to handle all requests in the session.

An Adapter Set defines the Metadata Adapter and one or several Data Adapters. If it is nil, the "DEFAULT" ID will be used.

- (LSConnectionConstraints*) constraints [read, write, copy]

Constraints to be applied on the overall data flow from the Connection.

The specified constraints can only be used in order to restrict the constraints set by Lightstreamer Server Metadata Adapter. If it is nil, no constraints will be specified.

- (int) contentLength [read, write, assign]

The length to be used by the Server for the response body on a stream connection (a minimum length, however, is ensured by the server).

After the content length exhaustion, the connection will be closed and a new connection will be automatically reopened. If it is 0, the length is decided by the Server.
The default setting is set to a very high value (50 millions).

- (BOOL) controlLinkHandlingEnabled [read, write, assign]

If YES, enables the automatic handling of the server address in order to bypass the load balancer server (if any) after the first connection and allow the cleanest communication possible between Lightstreamer client and server.


The default setting is YES.

- (BOOL) isPolling [read, write, assign]

If set to YES, data streaming is simulated through a smart polling mechanism, that is a sequence of synchronous connections to the Server, each of which will receive the currently available updates, or wait until one is available.


The use of polling can become necessary in cases where the connection stream is not delivered in real time because of some router or firewall or antivirus. Even when this flag is set to NO, however, the library may detect those cases and automatically attempt to resort to a smart polling connection, provided that enableStreamSense is set to YES.
The default setting is NO.

- (NSTimeInterval) keepaliveSecs [read, write, assign]

Keepalive time requested for the stream connection, in seconds.

After an inactivity of this length on the stream connection, a keepalive signal is sent by the Server. If it is 0, the keepalive time is decided by the Server. If it is too small, the Server may use a different keepalive time as well.
The default setting is 0.

- (LSMaxConcurrentSessionsPerServerExceededPolicy) maxConcurrentSessionsPerServerExceededPolicy [read, write, assign]

Sets the action to take when the maximum number of streaming connections is exceeded, as specified on the maxConcurrentSessionsPerServer property.

See the corresponding LSMaxConcurrentSessionsPerServerExceededPolicy enum for a list of possible actions.
The default action is Block.

- (NSString*) password [read, write, copy]

User password to be supplied to the Server in the connection request.

- (NSTimeInterval) pollingIdleSecs [read, write, assign]

Maximum time the Server is allowed to wait for updates in case none are available at connection time and a poll connection has been requested.

A zero value leads to a classical polling behaviour, while a nonzero value leads to an "asynchronous polling", also known as smart polling, behaviour. Typically, a nonzero value for this attribute is associated with a zero value for the "pollingSecs" attribute.
NOTE: since the Server, while waiting for an update, needs to keep a socket and a session active, even if the client has already closed the connection on its side, the Server may force a shorter wait.
The default setting is 30 seconds.

- (NSTimeInterval) pollingSecs [read, write, assign]

Time between the end of a poll connection and the start of the next one (in seconds), if polling behaviour has been specified.

Zero is a legal value, although the Server may decide to delay request fulfilling if request frequency is too high.
NOTE: since the Server needs to keep a session active between subsequent poll connections, the Server may force the library to use a polling time shorter than requested.
The default setting is 0.

- (NSTimeInterval) probeTimeoutSecs [read, write, assign]

Timeout for activity checks, expressed in seconds.

If, after a warning that the connection is stalled (see probeWarningSecs) no data has been received on the stream connection for this further time, then the connection is forcibly closed.
The default setting is 3 seconds.

- (NSTimeInterval) probeWarningSecs [read, write, assign]

Timeout for activity check warnings, expressed in seconds.

If no data is being received on the stream connection and a keepalive message is late for this time, then a notification is issued to the ConnectionDelegate that the connection is stalled.
After the notification, if some data or keepalive is received before probeTimeoutMillis elapses, then a notification is issued to the ConnectionListener that the activity is normal again; otherwise the connection is forcibly closed.
The default setting is 2 seconds.

- (NSString*) pushServerControlURL [read, write, copy]

Lightstreamer Server URL (without the path part) to be used for control requests.

It may differ from pushServerUrl because of the protocol. If it is nil, then pushServerURL is used.
Edition Note: HTTPS connections are not supported by the Server if it runs in Allegro or Moderato edition.

- (NSString*) pushServerURL [read, write, copy]

Lightstreamer Server URL, without the path part.


Edition Note: HTTPS connections are not supported by the Server if it runs in Allegro or Moderato edition.

- (NSTimeInterval) reconnectionTimeoutSecs [read, write, assign]

The maximum elapsed time in seconds allowed for a successful reconnection attempt.

Silent reconnections are performed in case of response content length filling or if polling behaviour has been requested.
NOTE: The first connection is not checked against this timeout; this can be done by the user by observing the elapsed time in the openConnection call.
The default setting is 5 seconds.

- (NSTimeInterval) retryDelaySecs [read, write, assign]

The number of seconds to wait since a disconnection before trying a new connection.


The default setting is 2 seconds.

- (NSTimeInterval) streamingTimeoutSecs [read, write, assign]

The maximum elapsed time in seconds allowed for the first successful streaming connection attempt on a streaming session.

The timeout check is performed only when the Stream-sense feature is enabled, i.e. enableStreamSense is YES; if it fails, the current attempt will be discarded and a new session opening will be tried in smart polling mode.
NOTE: In case the connection is not possible at all, the polling attempt may also hang. By observing the elapsed time in the openConnection call, the user can do an overall timeout checking that does not depend on the outcome of single attempts.
The default setting is 5 seconds.

- (BOOL) streamSenseEnabled [read, write, assign]

If YES, enables the Stream-sense feature, which means that in case a streaming connection can't ben opened it will automatically failback to polling mode.


The default setting is YES.

- (NSString*) user [read, write, copy]

User name to be supplied to the Server in the connection request.


The documentation for this class was generated from the following file: