RORemoteService

Overview

A RORemoteService instance represents all information needed to identify a service on a remote machine that a client wants to communicate with, namely the ROClientChannel configured for the server's end point, the ROMessage for the approriate message encoding and the Service Name to uniquely identify the individual service on the server.

RORemoteServices can be configured manually by passing in the above three values, or they can be created based on service information discovered using ZeroConf.

A ROSimpleRemoteService descendant is provided to cater for the most common scenario of talking to a HTTP server via BinMessage without needing to manually create the necessary message and channel instances.

Location

 

channel  retain

Represents a client channel instance

@property (retain) ROClientChannel *channel

init

initializes a new, unconfigured remote service instance.

- (id) init

initWithMessage:channel:serviceName:

initializes a new remote service instance with the given ROMessage, ROClientChannel and service name.

- (id) initWithMessage:(ROMessage *)aMessage channel:(ROClientChannel *)aChannel serviceName:(NSString *)aServiceName

Parameters:

  • aMessage: ROMessage instance which will be used for working with given remote service
  • aChannel: ROClientChannel instance
  • aServiceName: Name of the service

initWithNetService:

initializes a new remote service instance with the given NSNetService obtained from ZeroConf .

- (id) initWithNetService:(NSNetService *)aService

Parameters:

  • aService:

initWithNetService:serviceName:

initializes a new remote service instance with the given ZeroConf NSNetService, but overrides the default service name.

This can be useful when contacting additional known services on a discovered server.

- (id) initWithNetService:(NSNetService *)aService serviceName:(NSString *)aName

Parameters:

  • aService:
  • aName: Custom service name

initWithTargetUrl:serviceName:  deprecated

Initializes a new remote service instance with the given Target URL (presented as NSString) and service name.

Deprecated. Please use initWithTargetURL:serviceName: instead.

- (id) initWithTargetUrl:(NSString *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl: Target URL string.
  • aServiceName: Name of the service

initWithTargetURL:serviceName:

Initializes a new remote service instance with the given Target URL and Service name.

- (id) initWithTargetURL:(NSURL *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl:
  • aServiceName:

message  retain

Represents the message instance of the Remote Service

@property (retain) ROMessage *message

remoteServiceWithMessage:channel:serviceName:

creates and returns a new remote service instance with the given ROMessage, ROClientChannel and service name.

+ (id) remoteServiceWithMessage:(ROMessage *)aMessage channel:(ROClientChannel *)aChannel serviceName:(NSString *)aServiceName

Parameters:

  • aMessage: Message for the Remote Service
  • aChannel: Channel for the Remote Service
  • aServiceName: Name of the service

remoteServiceWithNetService:

Creates and returns a new remote service instance with the given ZeroConf NSNetService.

+ (id) remoteServiceWithNetService:(NSNetService *)aService

Parameters:

  • aService:

remoteServiceWithNetService:serviceName:

creates and returns a new remote service instance with the given ZeroConf NSNetService, but overrides the default service name. This is useful when contacting additional known services on a discovered server.

+ (id) remoteServiceWithNetService:(NSNetService *)aService serviceName:(NSString *)aServiceName

Parameters:

  • aService: NSNetService instance that came from ZeroConf
  • aServiceName: Represents the name of the service you want to connect to

remoteServiceWithTargetUrl:serviceName:  deprecated

Creates and initialize RORemoteService instance with given service name and target URL as string.
Deprecated. Please use remoteServiceWithTargetURL:serviceName: instead

+ (id) remoteServiceWithTargetUrl:(NSString *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl: Represents target URL as string of the remote service
  • aServiceName: Name of the remote service we want to connect to

remoteServiceWithTargetURL:serviceName:

Creates and initialize RORemoteService instance with given service name and target URL

+ (id) remoteServiceWithTargetURL:(NSURL *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl: Represents target URL of the remote service
  • aServiceName: Name of the remote service we want to connect to

resolved

Boolean flag shows was this remote service already resolved via ZeroConf or not.

@property (readonly) BOOL resolved

serviceName  copy

Name of the RemoteService

@property (copy) NSString *serviceName

 

channel  retain

Represents a client channel instance

@property (retain) ROClientChannel *channel

message  retain

Represents the message instance of the Remote Service

@property (retain) ROMessage *message

resolved

Boolean flag shows was this remote service already resolved via ZeroConf or not.

@property (readonly) BOOL resolved

serviceName  copy

Name of the RemoteService

@property (copy) NSString *serviceName

 

remoteServiceWithMessage:channel:serviceName:

creates and returns a new remote service instance with the given ROMessage, ROClientChannel and service name.

+ (id) remoteServiceWithMessage:(ROMessage *)aMessage channel:(ROClientChannel *)aChannel serviceName:(NSString *)aServiceName

Parameters:

  • aMessage: Message for the Remote Service
  • aChannel: Channel for the Remote Service
  • aServiceName: Name of the service

remoteServiceWithNetService:

Creates and returns a new remote service instance with the given ZeroConf NSNetService.

+ (id) remoteServiceWithNetService:(NSNetService *)aService

Parameters:

  • aService:

remoteServiceWithNetService:serviceName:

creates and returns a new remote service instance with the given ZeroConf NSNetService, but overrides the default service name. This is useful when contacting additional known services on a discovered server.

+ (id) remoteServiceWithNetService:(NSNetService *)aService serviceName:(NSString *)aServiceName

Parameters:

  • aService: NSNetService instance that came from ZeroConf
  • aServiceName: Represents the name of the service you want to connect to

remoteServiceWithTargetUrl:serviceName:  deprecated

Creates and initialize RORemoteService instance with given service name and target URL as string.
Deprecated. Please use remoteServiceWithTargetURL:serviceName: instead

+ (id) remoteServiceWithTargetUrl:(NSString *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl: Represents target URL as string of the remote service
  • aServiceName: Name of the remote service we want to connect to

remoteServiceWithTargetURL:serviceName:

Creates and initialize RORemoteService instance with given service name and target URL

+ (id) remoteServiceWithTargetURL:(NSURL *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl: Represents target URL of the remote service
  • aServiceName: Name of the remote service we want to connect to

 

init

initializes a new, unconfigured remote service instance.

- (id) init

initWithMessage:channel:serviceName:

initializes a new remote service instance with the given ROMessage, ROClientChannel and service name.

- (id) initWithMessage:(ROMessage *)aMessage channel:(ROClientChannel *)aChannel serviceName:(NSString *)aServiceName

Parameters:

  • aMessage: ROMessage instance which will be used for working with given remote service
  • aChannel: ROClientChannel instance
  • aServiceName: Name of the service

initWithNetService:

initializes a new remote service instance with the given NSNetService obtained from ZeroConf .

- (id) initWithNetService:(NSNetService *)aService

Parameters:

  • aService:

initWithNetService:serviceName:

initializes a new remote service instance with the given ZeroConf NSNetService, but overrides the default service name.

This can be useful when contacting additional known services on a discovered server.

- (id) initWithNetService:(NSNetService *)aService serviceName:(NSString *)aName

Parameters:

  • aService:
  • aName: Custom service name

initWithTargetUrl:serviceName:  deprecated

Initializes a new remote service instance with the given Target URL (presented as NSString) and service name.

Deprecated. Please use initWithTargetURL:serviceName: instead.

- (id) initWithTargetUrl:(NSString *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl: Target URL string.
  • aServiceName: Name of the service

initWithTargetURL:serviceName:

Initializes a new remote service instance with the given Target URL and Service name.

- (id) initWithTargetURL:(NSURL *)targetUrl serviceName:(NSString *)aServiceName

Parameters:

  • targetUrl:
  • aServiceName:

Descendants

See Also