TIBCO eFTL™
Class Methods | Public Attributes | List of all members
eFTL Class Reference

Programs use class EFTL to connect to an eFTL server. More...

Inheritance diagram for eFTL:

Class Methods

(void) + connect:properties:listener:
 Connect to an eFTL server. More...
 
(void) + setSSLTrustCertificates:
 Set the SSL trust certificates that the client library uses to verify certificates from the eFTL server. More...
 
(NSString *) + version
 Get the version of the eFTL Objective-C client library. More...
 

Public Attributes

NSString *const eFTLDurableTypeLastValue
 Last-value durable type. More...
 
NSString *const eFTLDurableTypeShared
 Shared durable type. More...
 
NSString *const eFTLPropertyAutoReconnectAttempts
 Specify number of autoreconnect attempts for lost connections; property name. More...
 
NSString *const eFTLPropertyAutoReconnectMaxDelay
 Specify the maximum delay between autoreconnect attempts for lost connections; property name. More...
 
NSString *const eFTLPropertyClientId
 Connect using this client identifier; property name. More...
 
NSString *const eFTLPropertyDurableKey
 Specify the key field of a eFTL::DurableTypeLastValue durable subscription; property name. More...
 
NSString *const eFTLPropertyDurableType
 Create a durable subscription of this type; property name. More...
 
NSString *const eFTLPropertyNotificationToken
 Token for push notifications; property name. More...
 
NSString *const eFTLPropertyPassword
 Connect using this password; property name. More...
 
NSString *const eFTLPropertyTimeout
 Connection attempt timeout; property name. More...
 
NSString *const eFTLPropertyUsername
 Connect as this user; property name. More...
 

Detailed Description

Programs use class EFTL to connect to an eFTL server.

Method Documentation

+ (void) connect: (NSString *)  url
properties: (NSDictionary *)  properties
listener: (id< eFTLConnectionListener >)  listener 

Connect to an eFTL server.

This call returns immediately; connecting continues asynchronously. When the connection is ready to use, the eFTL library calls your connectionDidConnect: (eFTLConnectionListener-p) method, passing an eFTLConnection object that you can use to publish and subscribe.

A program that uses more than one server channel must connect separately to each channel.

Parameters
urlThe call connects to the eFTL server at this URL. The URL can be in either of these forms:
ws://host:port/channel}
wss://host:port/channel}
Optionally, the URL can contain the username, password, and/or client identifier:
ws://username:password@host:port/channel?clientId=<identifier>}
wss://username:password@host:port/channel?clientId=<identifier>}
propertiesThese properties affect the connection attempt:
listenerConnection events invoke methods of this listener.
Exceptions
NSInvalidArgumentExceptionThe URL is invalid.
See also
eFTLConnectionListener
+ (void) setSSLTrustCertificates: (NSArray *)  certificates

Set the SSL trust certificates that the client library uses to verify certificates from the eFTL server.

You cannot set trust certificates after the first eFTL::connect:properties:listener: call.

If you do not set the SSL trust certificates, then the application trusts any server certificate.

This example illustrates loading a certificate from the application's main bundle:

NSString *path = [[NSBundle mainBundle] pathForResource:@"ca"
ofType:@"cer"]
NSData *data = [NSData dataWithContentsOfFile:path];
SecCertificateRef certificate =
SecCertificateCreateWithData(NULL, (__bridge CFDataRef)data);
NSArray *certificates =
[NSArray arrayWithObject:(__bridge id)(certificate)];
Parameters
certificatesUse the trust certificates in this array, or nil to remove an array of trust certificates.
+ (NSString *) version

Get the version of the eFTL Objective-C client library.

Returns
The version of the eFTL Objective-C client library.

Member Data Documentation

- (NSString* const) eFTLDurableTypeLastValue

Last-value durable type.

A last-value durable subscription stores only the most recent message for each unique value of the key field.

- (NSString* const) eFTLDurableTypeShared

Shared durable type.

Multiple cooperating subscribers can use the same shared durable to each receive a portion of the subscription's messages.

- (NSString* const) eFTLPropertyAutoReconnectAttempts

Specify number of autoreconnect attempts for lost connections; property name.

Programs use this property to supply the maximum number of autoreconnect attempts for a lost connection to the connect:properties:listener: call.

If not specified, the default value is 5.

- (NSString* const) eFTLPropertyAutoReconnectMaxDelay

Specify the maximum delay between autoreconnect attempts for lost connections; property name.

Programs use this property to supply the maximum delay between autoreconnect attempts for a lost connection to the connect:properties:listener: call. Following the loss of a connection, the client delays for 1 second before attempting to autoreconnect. Subsequent attempts double the delay time, up to the maximum specified.

If not specified, the default value is 30 seconds.

- (NSString* const) eFTLPropertyClientId

Connect using this client identifier; property name.

Programs use this property to supply a client identifier to the connect:properties:listener: call if the client identifier is not specified with the URL. The server uses the client identifier to associate a particular client with a durable subscription.

If you omit this property, the server assigns a unique client identifier.

- (NSString* const) eFTLPropertyDurableKey

Specify the key field of a eFTL::DurableTypeLastValue durable subscription; property name.

Programs use this property to supply a key field to the eFTLConnection::subscribeWithMatcher:durable:properties:listener call when the eFTL::eFTLPropertyDurableType is of type eFTL::eFTLDurableTypeLastValue.

Note that the supplied key field must be a part of the durable subscription's matcher.

- (NSString* const) eFTLPropertyDurableType

Create a durable subscription of this type; property name.

Programs use this optional property to supply a durable type to the eFTLConnection::subscribeWithMatcher:durable:properties:listener call.

The available durable types are eFTL::eFTLDurableTypeShared and eFTL::eFTLDurableTypeLastValue.

If not specified the default durable type will be used.

- (NSString* const) eFTLPropertyNotificationToken

Token for push notifications; property name.

Programs use this property to supply an APNS device token to the connect:properties:listener: call.

The eFTL server uses the token to push notifications to a disconnected client when messages are available.

- (NSString* const) eFTLPropertyPassword

Connect using this password; property name.

Programs use this property with the connect:properties:listener: call to supply a password credential if the password is not specified with the URL. The server authenticates the username and password.

- (NSString* const) eFTLPropertyTimeout

Connection attempt timeout; property name.

If eFTL cannot connect to the server within this time limit (in seconds), it stops trying to connect and invokes your connection:didDisconnectWithCode:reason: (eFTLConnectionListener-p) method with an eFTLConnection::eFTLConnectionError code.

If you omit this property, the default timeout is 15.0 seconds.

- (NSString* const) eFTLPropertyUsername

Connect as this user; property name.

Programs use this property with the connect:properties:listener: call to supply a username credential if the username is not specified with the URL. The server authenticates the username and password.


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