ROHTTPClientChannel
Overview
ROHTTPClientChannel implements the standard Client Channel for communicating with Remoting SDK servers via the HTTP protocol. It is also the channel used by the ROSimpleRemoteService.
Location
- Reference: ROHTTPClientChannel.h
- Namespace: RemObjectsSDK
- Ancestry: NSObject | ROChannel | ROClientChannel | ROHTTPClientChannel
asyncDispatch: protected deprecated (declared in ROClientChannel)
For internal use
Dispatches the given message asynchronously and returns an ROAsyncRequest reference.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
This method is deprecated. If you will need to dispatch some mesages manually, then please use asyncDispatch:withProxy:start
or asyncDispatch:withProxy:startWithBlock:
instead
- (ROAsyncRequest *) asyncDispatch:(id)aMessage
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
asyncDispatch:start: protected deprecated (declared in ROClientChannel)
For internal use
Prepares and return asynchronous request for dispatching the given message.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
This method is deprecated. If you will need to dispatch some mesages manually, then please use asyncDispatch:withProxy:start
or asyncDispatch:withProxy:startWithBlock:
instead
- (ROAsyncRequest *) asyncDispatch:(id)aMessage start:(BOOL)start
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
- start: Boolean flag, If
YES
then it start dispatching request immediately. IfNO
, then request will start automatically. You will need to start it manually. Deffered starting asynchronous dispatching can be useful for additional configuring asynchronous request before running it.
asyncDispatch:withProxy:start: protected (declared in ROClientChannel)
For internal use
Prepares and return asynchronous request for dispatching the given message for given proxy.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
- (ROAsyncRequest *) asyncDispatch:(id)aMessage withProxy:(ROAsyncProxy *)proxy start:(BOOL)start
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
- proxy: reference to the ROAsyncProxy which is stored in the result asynchronous request.
Later when asynchronous request completes, proxy can be used for obtaining request results. For example:
- (void) asyncRequestDidComplete:(ROAsyncRequest *)aRequest {
...
if (aRequest.type == artGetDataTable) {
NSData *data = [[request proxy] endGetData:aRequest];
...
}
...
}
- start: Boolean flag, If
YES
then it start dispatching request immediately. IfNO
, then request will start automatically. You will need to start it manually. Deffered starting asynchronous dispatching can be useful for additional configuring asynchronous request before running it.
asyncDispatch:withProxy:startWithBlock: protected (declared in ROClientChannel)
For internal use
Prepares and start asynchronous request with given completion block for dispatching the message for given proxy.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
- (ROAsyncRequest *) asyncDispatch:(id)aMessage withProxy:(ROAsyncProxy *)proxy startWithBlock:(void(^)(ROAsyncRequest *))block
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
- proxy: reference to the ROAsyncProxy which is stored in the result asynchronous request.
Later when asynchronous request completes, proxy can be used for obtaining request results. For example:
- (void) asyncRequestDidComplete:(ROAsyncRequest *)aRequest {
...
if (aRequest.type == artGetDataTable) {
NSData *data = [[request proxy] endGetData:aRequest];
...
}
...
}
- block: completion block, will be called after asynchronous dispatching ends
channel protected (declared in ROClientChannel)
Returns a created channel
+ (id) channel
channelWithTargetUrl: protected deprecated (declared in ROClientChannel)
returns a new channel instance initialized with given NSURL
Deprecated. Please use channelWithTargetURL
instead
+ (id) channelWithTargetUrl:(NSString *)targetUrl
Parameters:
- targetUrl: Target URL as String
channelWithTargetURL: protected (declared in ROClientChannel)
returns a new channel instance initialized with given NSURL
+ (id) channelWithTargetURL:(NSURL *)targetUrl
Parameters:
- targetUrl: Target URL
clearHeaderFields
- (void) clearHeaderFields
decreaseNetworkActivityIndicator (declared in ROClientChannel)
+ (void) decreaseNetworkActivityIndicator
delegate protected assign (declared in ROClientChannel)
Delegate object to receive events through the ROClientChannelDelegate protocol.
@property (assign) id delegate
dispatch: protected (declared in ROClientChannel)
for internal use
Dispatches the given message synchronously.
This method relies on the intDispatch:
method provided by concrete client channel implementations for the actual dispatching.
- (void) dispatch:(id)aMessage
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
followRedirects assign
Specifies whether the channel will honor 304 HTTP redirect responses and automatically resend the request to the redirected URL (YES, default) or not (NO).
@property (assign) BOOL followRedirects
getValueOfHeaderField:
- (NSString *) getValueOfHeaderField:(NSString *)name
Parameters:
- name:
handleAuthenticationChallenge:forHost:callback: (declared in ROClientChannel)
+ (void) handleAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge forHost:(NSString *)host callback:(BOOL(^)(ROCertificateInfo *))block
Parameters:
- challenge:
- host:
- block:
increaseNetworkActivityIndicator (declared in ROClientChannel)
+ (void) increaseNetworkActivityIndicator
initWithTargetUrl: protected deprecated (declared in ROClientChannel)
- (InstanceType) initWithTargetUrl:(NSString *)aTargetUrl
Parameters:
- aTargetUrl:
initWithTargetURL: protected (declared in ROClientChannel)
- (InstanceType) initWithTargetURL:(NSURL *)aTargetURL
Parameters:
- aTargetURL:
isBusy protected (declared in ROClientChannel)
Property that shows is channel busy or not.
Actual implementation differs for different channels. For example syhchronous channels like HTTP channel can process only one request per moment. So using this property you can know does channel do something or its free for dispatching new messages.
@property (readonly) BOOL isBusy
performLoginNeeded:forAsyncRequest: (declared in ROClientChannel)
- (void) performLoginNeeded:(ROServerException *)exception forAsyncRequest:(ROAsyncRequest *)request
Parameters:
- exception:
- request:
runLoop (declared in ROClientChannel)
@property (readonly) NSRunLoop *runLoop
scheduleAsyncRequest: (declared in ROClientChannel)
- (void) scheduleAsyncRequest:(ROAsyncRequest *)request
Parameters:
- request:
setValue:forHeaderField:
- (void) setValue:(NSString *)value forHeaderField:(NSString *)name
Parameters:
- value:
- name:
targetUrl protected copy deprecated (declared in ROClientChannel)
This property keeps target URL as the string, for the channel. Since any things with URL in String format are deprecated, please use targetURL property instead.
@property (copy, deprecated) NSString *targetUrl
targetURL protected copy (declared in ROClientChannel)
Property keeps target URL, for the channel.
@property (copy) NSURL *targetURL
timeout assign
The timeout, in seconds, to allow for the HTTP request to complete. Default is a generous 360 seconds (6 minutes).
@property (assign) long timeout
triggerOnLoginNeeded: (declared in ROClientChannel)
- (BOOL) triggerOnLoginNeeded:(ROServerException *)exception
Parameters:
- exception:
delegate protected assign (declared in ROClientChannel)
Delegate object to receive events through the ROClientChannelDelegate protocol.
@property (assign) id delegate
followRedirects assign
Specifies whether the channel will honor 304 HTTP redirect responses and automatically resend the request to the redirected URL (YES, default) or not (NO).
@property (assign) BOOL followRedirects
isBusy protected (declared in ROClientChannel)
Property that shows is channel busy or not.
Actual implementation differs for different channels. For example syhchronous channels like HTTP channel can process only one request per moment. So using this property you can know does channel do something or its free for dispatching new messages.
@property (readonly) BOOL isBusy
runLoop (declared in ROClientChannel)
@property (readonly) NSRunLoop *runLoop
targetUrl protected copy deprecated (declared in ROClientChannel)
This property keeps target URL as the string, for the channel. Since any things with URL in String format are deprecated, please use targetURL property instead.
@property (copy, deprecated) NSString *targetUrl
targetURL protected copy (declared in ROClientChannel)
Property keeps target URL, for the channel.
@property (copy) NSURL *targetURL
timeout assign
The timeout, in seconds, to allow for the HTTP request to complete. Default is a generous 360 seconds (6 minutes).
@property (assign) long timeout
channel protected (declared in ROClientChannel)
Returns a created channel
+ (id) channel
channelWithTargetUrl: protected deprecated (declared in ROClientChannel)
returns a new channel instance initialized with given NSURL
Deprecated. Please use channelWithTargetURL
instead
+ (id) channelWithTargetUrl:(NSString *)targetUrl
Parameters:
- targetUrl: Target URL as String
channelWithTargetURL: protected (declared in ROClientChannel)
returns a new channel instance initialized with given NSURL
+ (id) channelWithTargetURL:(NSURL *)targetUrl
Parameters:
- targetUrl: Target URL
decreaseNetworkActivityIndicator (declared in ROClientChannel)
+ (void) decreaseNetworkActivityIndicator
handleAuthenticationChallenge:forHost:callback: (declared in ROClientChannel)
+ (void) handleAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge forHost:(NSString *)host callback:(BOOL(^)(ROCertificateInfo *))block
Parameters:
- challenge:
- host:
- block:
increaseNetworkActivityIndicator (declared in ROClientChannel)
+ (void) increaseNetworkActivityIndicator
asyncDispatch: protected deprecated (declared in ROClientChannel)
For internal use
Dispatches the given message asynchronously and returns an ROAsyncRequest reference.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
This method is deprecated. If you will need to dispatch some mesages manually, then please use asyncDispatch:withProxy:start
or asyncDispatch:withProxy:startWithBlock:
instead
- (ROAsyncRequest *) asyncDispatch:(id)aMessage
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
asyncDispatch:start: protected deprecated (declared in ROClientChannel)
For internal use
Prepares and return asynchronous request for dispatching the given message.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
This method is deprecated. If you will need to dispatch some mesages manually, then please use asyncDispatch:withProxy:start
or asyncDispatch:withProxy:startWithBlock:
instead
- (ROAsyncRequest *) asyncDispatch:(id)aMessage start:(BOOL)start
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
- start: Boolean flag, If
YES
then it start dispatching request immediately. IfNO
, then request will start automatically. You will need to start it manually. Deffered starting asynchronous dispatching can be useful for additional configuring asynchronous request before running it.
asyncDispatch:withProxy:start: protected (declared in ROClientChannel)
For internal use
Prepares and return asynchronous request for dispatching the given message for given proxy.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
- (ROAsyncRequest *) asyncDispatch:(id)aMessage withProxy:(ROAsyncProxy *)proxy start:(BOOL)start
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
- proxy: reference to the ROAsyncProxy which is stored in the result asynchronous request.
Later when asynchronous request completes, proxy can be used for obtaining request results. For example:
- (void) asyncRequestDidComplete:(ROAsyncRequest *)aRequest {
...
if (aRequest.type == artGetDataTable) {
NSData *data = [[request proxy] endGetData:aRequest];
...
}
...
}
- start: Boolean flag, If
YES
then it start dispatching request immediately. IfNO
, then request will start automatically. You will need to start it manually. Deffered starting asynchronous dispatching can be useful for additional configuring asynchronous request before running it.
asyncDispatch:withProxy:startWithBlock: protected (declared in ROClientChannel)
For internal use
Prepares and start asynchronous request with given completion block for dispatching the message for given proxy.
This method relies on the internal method intAsyncDispatch:responseMessage:
which implemenation depends on concrete client channel.
- (ROAsyncRequest *) asyncDispatch:(id)aMessage withProxy:(ROAsyncProxy *)proxy startWithBlock:(void(^)(ROAsyncRequest *))block
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
- proxy: reference to the ROAsyncProxy which is stored in the result asynchronous request.
Later when asynchronous request completes, proxy can be used for obtaining request results. For example:
- (void) asyncRequestDidComplete:(ROAsyncRequest *)aRequest {
...
if (aRequest.type == artGetDataTable) {
NSData *data = [[request proxy] endGetData:aRequest];
...
}
...
}
- block: completion block, will be called after asynchronous dispatching ends
clearHeaderFields
- (void) clearHeaderFields
dispatch: protected (declared in ROClientChannel)
for internal use
Dispatches the given message synchronously.
This method relies on the intDispatch:
method provided by concrete client channel implementations for the actual dispatching.
- (void) dispatch:(id)aMessage
Parameters:
- aMessage: instance of ROMessage that need to be dispatched
getValueOfHeaderField:
- (NSString *) getValueOfHeaderField:(NSString *)name
Parameters:
- name:
initWithTargetUrl: protected deprecated (declared in ROClientChannel)
- (InstanceType) initWithTargetUrl:(NSString *)aTargetUrl
Parameters:
- aTargetUrl:
initWithTargetURL: protected (declared in ROClientChannel)
- (InstanceType) initWithTargetURL:(NSURL *)aTargetURL
Parameters:
- aTargetURL:
performLoginNeeded:forAsyncRequest: (declared in ROClientChannel)
- (void) performLoginNeeded:(ROServerException *)exception forAsyncRequest:(ROAsyncRequest *)request
Parameters:
- exception:
- request:
scheduleAsyncRequest: (declared in ROClientChannel)
- (void) scheduleAsyncRequest:(ROAsyncRequest *)request
Parameters:
- request:
setValue:forHeaderField:
- (void) setValue:(NSString *)value forHeaderField:(NSString *)name
Parameters:
- value:
- name:
triggerOnLoginNeeded: (declared in ROClientChannel)
- (BOOL) triggerOnLoginNeeded:(ROServerException *)exception
Parameters:
- exception: