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 eFTLPropertyClientId
 Connect using this client identifier; 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) 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) 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: