DEPRECATED: Diffusion iOS Classic API  5.9.4
 All Data Structures Files Functions Variables Enumerations Enumerator Properties Macros Pages
<DFClientDelegate> Protocol Referenceabstract

Protocol implemented by classes wishing to receive notification from Diffusion. More...

#import <DFClientDelegate.h>

Instance Methods

(void) - onConnection:
 This method will be called when the DFClient trys to connect, if the connection is made then isConnected will be YES.
 
(void) - onMessage:
 This method will be called when a message has been received from the Diffusion Server.
 
(void) - onPing:
 This method will be called on receipt of the ping request.
 
(void) - onMessageNotAcknowledged:
 This method will be called if the server didn't respond to an Ack Message in time.
 
(void) - onConnectionSequenceExhausted:
 The list of DFServerDetails object has been exhausted, and no connection can be placed.
 
(void) - onConnectionFailedWithError:
 This method will be called, if implemented, for all failed connections.
 
(void) - onLostConnection
 This method will be called when the DFClient has lost connection to the Diffusion Server.
 
(void) - onAbort
 This method will be called when the Diffusion Server has terminated the connection (barred).
 
(void) - onServerRejectedConnection
 This method will be called after a send credentials message, and the server rejected the credentials.
 
(void) - onTopicRemoved:
 Conveys news from the Diffusion server that the named topic no longer exists.
 
(void) - onConnectionDetailsAcquired:forClient:
 The given DFServerDetails object has been selected for connection.
 

Detailed Description

Protocol implemented by classes wishing to receive notification from Diffusion.

Notification primarily of new messages and the state of the connection to the server.

Method Documentation

- (void) onAbort
optional

This method will be called when the Diffusion Server has terminated the connection (barred).

It will not be called if onConnectionFailedWithError: has been implemented.

- (void) onConnection: (BOOL)  isConnected

This method will be called when the DFClient trys to connect, if the connection is made then isConnected will be YES.

It will not be called with a value NO for isConnected if onConnectionFailedWithError: has been implemented.

Parameters
isConnected
- (void) onConnectionDetailsAcquired: (DFServerDetails *)  details
forClient: (DFClient *)  client 
optional

The given DFServerDetails object has been selected for connection.

Parameters
detailsDetails object that has been chosen.
clientDFClient that has chosen this DFServerDetails
- (void) onConnectionFailedWithError: (NSError *)  error
optional

This method will be called, if implemented, for all failed connections.

In which case the following messages will no longer be sent:

  • onConnection:NO
  • onLostConnection
  • onAbort
  • onServerRejectedConnection
- (void) onConnectionSequenceExhausted: (DFClient *)  client

The list of DFServerDetails object has been exhausted, and no connection can be placed.

Once this method is called the set of DFServerDetails is reset and further connections can be placed. In most simple scenarios where there is only one DFServerDetails object in the DFConnectionDetails object it should suffice to call method [client connect] here.

Parameters
clientDFClient that has exhausted its set of DFServerDetails object from the DFClientDetails object.
- (void) onLostConnection
optional

This method will be called when the DFClient has lost connection to the Diffusion Server.

It will not be called if onConnectionFailedWithError: has been implemented.

- (void) onMessage: (DFTopicMessage *)  message

This method will be called when a message has been received from the Diffusion Server.

This method will be called as well as any TopicListeners that might match the topic.

- (void) onMessageNotAcknowledged: (DFTopicMessage *)  message

This method will be called if the server didn't respond to an Ack Message in time.

See Also
TopicMessage
- (void) onPing: (DFPingMessage *)  message

This method will be called on receipt of the ping request.

See Also
DFClient
Parameters
messagePingMessage
- (void) onServerRejectedConnection
optional

This method will be called after a send credentials message, and the server rejected the credentials.

It will not be called if onConnectionFailedWithError: has been implemented.

See Also
DFClient

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