![]() |
DEPRECATED: Diffusion iOS Classic API
5.9.4
|
The main access to the Diffusion Client. More...
#import <DFClient.h>
Instance Methods | |
(void) | - close |
Close the connection. | |
(void) | - connect |
Connect to Diffusion using the pre supplied ConnectionDetails. | |
(void) | - reconnect |
Reconnect to Diffusion and attempt to reestablish use of the previous session (if there is one) | |
(NSString *) | - ping |
sends a ping to the connected Diffusion Server, this will result in a onPing(PingMessage) to be sent to the DFClientDelegate | |
(void) | - send:message: |
send a message to the Diffusion Server for the given topic | |
(void) | - sendTopicMessage: |
send a TopicMessage to Diffusion | |
(void) | - subscribe: |
(void) | - unsubscribe: |
(void) | - sendCredentials: |
(void) | - addTopicListener: |
(void) | - removeTopicListener: |
(void) | - removeAllTopicListeners |
Remove all topic listeners. | |
(NSArray *) | - topicListeners |
Get a read-only copy of the set of DFTopicListenerDelegate objects. | |
(void) | - fetch: |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names. | |
(BOOL) | - fetch:error: |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names. | |
(void) | - fetch:withCorrelation: |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names. | |
(BOOL) | - fetch:withCorrelation:error: |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names. | |
(void) | - acknowledge: |
Send a message acknowledgement back to the server. | |
(DFServiceTopicHandler *) | - createServiceTopicHandlerWithMessage:andDelegate: |
Create a new DFServiceTopicHandler. | |
(DFServiceTopicHandler *) | - createServiceTopicHandlerWithMessage:andDelegate:error: |
Create a new DFServiceTopicHandler. | |
(DFPagedTopicHandler *) | - createPagedTopicHandlerWithMessage:andDelegate: |
Creates a handler object for a 'paged' Topic. | |
(DFPagedTopicHandler *) | - createPagedTopicHandlerWithMessage:andDelegate:error: |
Creates a handler object for a 'paged' Topic. | |
(DFTopicNotifyTopicHandler *) | - createTopicNotifyTopicHandlerWithMessage:andDelegate: |
Creates a handler object for a 'Topic Notify' Topic. | |
(DFTopicNotifyTopicHandler *) | - createTopicNotifyTopicHandlerWithMessage:andDelegate:error: |
Creates a handler object for a 'Topic Notify' Topic. | |
Class Methods | |
(NSMutableDictionary *) | + sslOptions |
Dictionary of optional values used when establishing SSL/TLS encrypted connections. | |
Properties | |
BOOL | isConnected |
YES if the client is connected to a Diffusion Server. | |
BOOL | isReconnected |
YES if the client is reconnected to a Diffusion Server. | |
BOOL | isDebugging |
YES if the client should output debug diagnostics while interacting with Diffusion. | |
NSString * | clientID |
After the client has connected to Diffusion this contains the unique Client ID. | |
DFConnectionDetails * | connectionDetails |
The DFConnectionDetails object that this client will use to connect to Diffusion. | |
int | clientProtocolVersion |
the protocol version for this client | |
NSObject< DFClientDelegate > * | delegate |
Delegate object to notify when interacting with Diffusion. | |
NSTimeInterval | lastInteraction |
Returns the time (in seconds since the epoch) of the last interaction (send or receive) with the server. | |
The main access to the Diffusion Client.
An example would be to create a ConnectionDetails object and then call the connect method A DiffusionDelegate must be set on the ConnectionDetails object to receive any messages
- (void) acknowledge: | (DFTopicMessage *) | message |
Send a message acknowledgement back to the server.
This will be required if autoAck is set to NO
message | message to acknowledge |
- (void) addTopicListener: | (__weak NSObject< DFTopicListenerDelegate > *) | delegate |
delegate | add a DFTopicListenerDelegate, if the delegate topic matches the message topic, then onMessage function is called. Idiomatic of Objective C this delegate is not retained. |
- (DFPagedTopicHandler*) createPagedTopicHandlerWithMessage: | (DFTopicMessage *) | message | |
andDelegate: | (__weak NSObject< DFPagedTopicDelegate > *) | delegate | |
Creates a handler object for a 'paged' Topic.
message | the load message received from the Topic. |
delegate | an object that is to receive all notifications from the topic. Idiomatic of Objective C, this object is not retained. |
DFException | if the connected server implements less than protocol level 4 |
- (DFPagedTopicHandler*) createPagedTopicHandlerWithMessage: | (DFTopicMessage *) | message | |
andDelegate: | (__weak NSObject< DFPagedTopicDelegate > *) | delegate | |
error: | (NSError *__autoreleasing *) | error | |
Creates a handler object for a 'paged' Topic.
message | the load message received from the Topic. |
delegate | an object that is to receive all notifications from the topic. Idiomatic of Objective C, this object is not retained. |
error | populated in cases of error |
- (DFServiceTopicHandler*) createServiceTopicHandlerWithMessage: | (DFTopicMessage *) | message | |
andDelegate: | (__weak NSObject< DFServiceTopicDelegate > *) | delegate | |
Create a new DFServiceTopicHandler.
message | a service-topic-load message |
delegate | an object that implements the DFServiceTopicDelegate protocol. Idiomatic of Objective C, this object is not retained. |
DFException | if the connected server implements less than protocol level 4 |
- (DFServiceTopicHandler*) createServiceTopicHandlerWithMessage: | (DFTopicMessage *) | message | |
andDelegate: | (__weak NSObject< DFServiceTopicDelegate > *) | delegate | |
error: | (NSError *__autoreleasing *) | error | |
Create a new DFServiceTopicHandler.
message | a service-topic-load message |
delegate | an object that implements the DFServiceTopicDelegate protocol. Idiomatic of Objective C, this object is not retained. |
error | populated in cases of error |
- (DFTopicNotifyTopicHandler*) createTopicNotifyTopicHandlerWithMessage: | (DFTopicMessage *) | message | |
andDelegate: | (__weak NSObject< DFTopicNotifyTopicDelegate > *) | delegate | |
Creates a handler object for a 'Topic Notify' Topic.
message | the load message received from the Topic. |
delegate | an object that is to receive all notifications from the Topic. Idiomatic of Objective C, this object is not retained. |
DFException | if unable to create the handler. |
- (DFTopicNotifyTopicHandler*) createTopicNotifyTopicHandlerWithMessage: | (DFTopicMessage *) | message | |
andDelegate: | (__weak NSObject< DFTopicNotifyTopicDelegate > *) | delegate | |
error: | (NSError *__autoreleasing *) | error | |
Creates a handler object for a 'Topic Notify' Topic.
message | the load message received from the Topic. |
delegate | an object that is to receive all notifications from the Topic. Idiomatic of Objective C, this object is not retained. |
error | populated in cases of error |
- (void) fetch: | (NSString *) | topicSet |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names.
topicSet | Name of the topic to fetch |
DFException | if the connected server implements less than protocol level 3 |
- (BOOL) fetch: | (NSString *) | topicSet | |
error: | (NSError *__autoreleasing *) | error | |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names.
topicSet | Name of the topic to fetch |
error | set if the connected server implements less than protocol level 3 |
- (void) fetch: | (NSString *) | topicSet | |
withCorrelation: | (NSArray *) | headers | |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names.
topicSet | Name of the topic to fetch |
headers | NSArray of NSString that will be relayed back from the server to aid request correlation |
DFException | if the connected server implements less than protocol level 3 |
- (BOOL) fetch: | (NSString *) | topicSet | |
withCorrelation: | (NSArray *) | headers | |
error: | (NSError *__autoreleasing *) | error | |
Issue a fetch request to the Diffusion server, for the given set of comma delimeted topic-names.
topicSet | Name of the topic to fetch |
headers | NSArray of NSString that will be relayed back from the server to aid request correlation |
error | set if the connected server implements less than protocol level 3; |
- (NSString *) ping |
sends a ping to the connected Diffusion Server, this will result in a onPing(PingMessage) to be sent to the DFClientDelegate
- (void) removeTopicListener: | (NSObject< DFTopicListenerDelegate > *) | delegate |
delegate | remove a DFTopicListenerDelegate |
- (void) send: | (NSString *) | topic | |
message: | (NSString *) | message | |
send a message to the Diffusion Server for the given topic
topic | the message topic |
message | the message |
- (void) sendCredentials: | (DFCredentials *) | credentials |
credentials | send credentials to the server |
- (void) sendTopicMessage: | (DFTopicMessage *) | aTopicMessage |
send a TopicMessage to Diffusion
aTopicMessage | the TopicMessage to send |
+ (NSMutableDictionary*) sslOptions |
Dictionary of optional values used when establishing SSL/TLS encrypted connections.
Make the iOS device overlook self signed certificates with this, for example... [[DFClient sslOptions] setObject:[NSNumber numberWithBool:YES] forKey:(NSString*)kCFStreamSSLAllowsAnyRoot];
- (void) subscribe: | (NSString *) | topicSet |
topicSet | the topicSet to subscribe to |
- (void) unsubscribe: | (NSString *) | topicSet |
topicSet | the topicSet to unsubscribe to |
|
readnonatomicassign |
Returns the time (in seconds since the epoch) of the last interaction (send or receive) with the server.
Can be 0 if no interaction