ROSuperHTTPClientChannelDelegate

Overview

This protocol is intended to extend ROClientChannelDelegate protocol with some events specific to the ROSuperHTTPClientChannel client channel class.

Location


Optional Methods


clientChannel:didReceiveDataSize:ofExpected:    (declared in ROClientChannelDelegate)

Informs the delegate object that all or part of the response data have been received from the server. Implement this delegate method if you want to track the incoming data flow.

@optional - (void) clientChannel:(ROClientChannel *)channel didReceiveDataSize:(int)size ofExpected:(int)totalSize

Parameters:

  • channel: The channel object that receives the data.
  • size: Total number of bytes currently received by the channel object. This number increases step by step and reaches totalSize value with the last packet.
  • totalSize: Total number of bytes to be received (server response length).

clientChannel:didSendDataSize:ofExpected:    (declared in ROClientChannelDelegate)

Informs the delegate object that all or part of the request data have been sent to the server. Implement this delegate method if you want to track the outgoing data flow.

@optional - (void) clientChannel:(ROClientChannel *)channel didSendDataSize:(int)size ofExpected:(int)totalSize

Parameters:

  • channel: The channel object that sends the data.
  • size: Total number of bytes currently sent by the channel object. This number increases step by step and reaches totalSize value with the last packet.
  • totalSize: Total number of bytes to be sent to the server (request length).

clientChannel:requestDidFailWithException:    (declared in ROClientChannelDelegate)

Informs the delegate object that an exception was thrown while dispatching the message. This method will not be called for SessionNotFoundException, because it is related to the login sequence. The method will be called before the exception is rethrown to the upper level. You cannot forbid exceptions to be rethrown.
Implement this method if you want to be informed about the exception before it is thrown at application level.

@optional - (void) clientChannel:(ROClientChannel *)channel requestDidFailWithException:(NSException *)exception

Parameters:

  • channel: The channel object that dispatches the message.
  • exception: Exception object to be thrown.

clientChannelDidFinishLogin:    (declared in ROClientChannelDelegate)

In the case of Asynchronous Requests, the delegate object is informed that the login sequence related to the client channel has finished, either successfully or not.

@optional - (void) clientChannelDidFinishLogin:(ROClientChannel *)channel

Parameters:

  • channel: The channel the login sequence was related to.

clientChannelDidSuspendRequestAwaitingLogin:    (declared in ROClientChannelDelegate)

@optional - (void) clientChannelDidSuspendRequestAwaitingLogin:(ROClientChannel *)channel

Parameters:

  • channel:

clientChannelNeedsLogin:    (declared in ROClientChannelDelegate)

Informs the delegate method that the login procedure must be performed before any remote request can be successfully completed. According to RO's Authentication and Login approach, the SessionNotFoundException exception will be thrown if login is required. This exception is handled internally and the clientChannelNeedsLogin delegate method is called instead of standard exception processing.
The delegate method returns YES if the login procedure succeeded and the original remote request will be repeated. In case of login failure NO will be returned and the remote request execution will be canceled.
Notice: in the case of Asynchronous Requests, this method will be performed on the worker thread, not on the application's main thread.
Implement this method if the standard authentication approach is used.

@optional - (BOOL) clientChannelNeedsLogin:(ROClientChannel *)channel

Parameters:

  • channel: The channel the login sequence is related to.

clientChannelNeedsLoginOnMainThread:    (declared in ROClientChannelDelegate)

The role of this method is same as above but it is performed on the main application thread. You should use this method if your code can only be be executed on the main thread.

@optional - (BOOL) clientChannelNeedsLoginOnMainThread:(ROClientChannel *)channel

Parameters:

  • channel: The channel the login sequence was related to.

clientChannelWillBeginLogin:    (declared in ROClientChannelDelegate)

In case of Asynchronous Requests, the delegate object will be informed that the login sequence related to the client channel will be initiated.

@optional - (void) clientChannelWillBeginLogin:(ROClientChannel *)channel

Parameters:

  • channel: The channel the login sequence will be related to.

superChannel:didFailToConnectWithException:

@optional - (void) superChannel:(ROSuperHTTPClientChannel *)sender didFailToConnectWithException:(NSException *)exception

Parameters:

  • sender:
  • exception:

superChannelDidConnect:

@optional - (void) superChannelDidConnect:(ROSuperHTTPClientChannel *)sender

Parameters:

  • sender:

superChannelDidDisconnect:

@optional - (void) superChannelDidDisconnect:(ROSuperHTTPClientChannel *)sender

Parameters:

  • sender:

superChannelDidSendInvalidClientId:reconnect:

@optional - (void) superChannelDidSendInvalidClientId:(ROSuperHTTPClientChannel *)sender reconnect:(BOOL *)aReconnect

Parameters:

  • sender:
  • aReconnect:

superChannelWillConnect:

@optional - (void) superChannelWillConnect:(ROSuperHTTPClientChannel *)sender

Parameters:

  • sender:

superChannelWillDisconnect:

@optional - (void) superChannelWillDisconnect:(ROSuperHTTPClientChannel *)sender

Parameters:

  • sender: