TIBCO eFTL™
|
Programs use class EFTL to connect to an eFTL server. More...
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... | |
Programs use class EFTL to connect to an eFTL server.
+ (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.
url | The 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}
ws://username:password@host:port/channel?clientId=<identifier>}
wss://username:password@host:port/channel?clientId=<identifier>}
|
properties | These properties affect the connection attempt: |
listener | Connection events invoke methods of this listener. |
NSInvalidArgumentException | The URL is invalid. |
+ (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:
certificates | Use 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.
- (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.