JSONRPCMethodCall Class Reference

This class represent a method call on a JSON-RPC WebService. More...

#import <JSONRPCMethodCall.h>

List of all members.

Public Member Functions

(id) - initWithMethodName:parameters:
 Designed initializer.
(id) - initWithMethodNameAndParams:
 Constructor.
(id) - initWithMethodName:namedParameters:
 Designed initializer.
(id) - initWithMethodNameAndNamedParams:
 Constructor.
(id) - proxyForJson

Static Public Member Functions

(id) + methodCallWithMethodName:parameters:
 Commodity constructor.
(id) + methodCallWithMethodNameAndParams:
 Commodity constructor.
(id) + methodCallWithMethodName:namedParameters:
 Commodity constructor.
(id) + methodCallWithMethodNameAndNamedParams:
 Commodity constructor.

Properties

NSString * methodName
 will be affected when the JSONRPCMethodCall is called by a service
id parameters
 NSArray for positional parameters, NSDictionary for named parameters.
NSString * uuid
 the id of the JSON-RPC method call. You typically don't need to use this @property.
JSONRPCServiceservice

Detailed Description

This class represent a method call on a JSON-RPC WebService.

Note:
In practive, you rarely create a JSONRPCMethodCall directly. (except if you want to call the designed callMethod: (JSONRPCService) method but everybody typically prefer commodity methods).

But this class is still useful as it is returned as a parameter when receiving the response of the WebService, as it can be used to identify which method call correspond to the response, by inspecting its methodName and parameters @properties.


Member Function Documentation

- (id) initWithMethodName: (NSString*)  methodName
namedParameters: (NSDictionary*)  params 

Designed initializer.

Parameters:
methodName the name of the JSON-RPC method for this method call
params the dictionary of (named) parameters to pass to the method call
- (id) initWithMethodName: (NSString*)  methodName
parameters: (NSArray*)  params 

Designed initializer.

Parameters:
methodName the name of the JSON-RPC method for this method call
params the array of parameters to pass to the method call
- (id) initWithMethodNameAndNamedParams: (NSString *)  methodName
,   NS_REQUIRES_NIL_TERMINATION 

Constructor.

Parameters:
methodName the name of the JSON-RPC method for this method call
NS_REQUIRES_NIL_TERMINATION the subsequent parameters are the parameters values and names for the JSON-RPC method. This list of parameters must have a even number of items, alternating the parameter value with the corresponding parameter name, and must be nil-terminated (as in NSDictionary's dictionaryWithObjectsAndKeys:)
- (id) initWithMethodNameAndParams: (NSString *)  methodName
,   NS_REQUIRES_NIL_TERMINATION 

Constructor.

Parameters:
methodName the name of the JSON-RPC method for this method call
NS_REQUIRES_NIL_TERMINATION the subsequent parameters are the parameters of the JSON-RPC method. This list of parameters must be nil-terminated.
+ (id) methodCallWithMethodName: (NSString*)  methodName
namedParameters: (NSDictionary*)  params 

Commodity constructor.

See also:
- initWithMethodName:namedParameters:
+ (id) methodCallWithMethodName: (NSString*)  methodName
parameters: (NSArray*)  params 

Commodity constructor.

See also:
- initWithMethodName:parameters:
+ (id) methodCallWithMethodNameAndNamedParams: (NSString *)  methodName
,   NS_REQUIRES_NIL_TERMINATION 

Commodity constructor.

See also:
JSONRPCMethodCall::initWithMethodNameAndNamedParameters:
+ (id) methodCallWithMethodNameAndParams: (NSString *)  methodName
,   NS_REQUIRES_NIL_TERMINATION 

Commodity constructor.

See also:
JSONRPCMethodCall::initWithMethodNameAndParameters:
- (id) proxyForJson  
Returns:
the JSON representation of the JSONRPCMethodCall.

Property Documentation

- (NSString*) methodName [read, write, retain]

will be affected when the JSONRPCMethodCall is called by a service

the name of the JSON-RPC method

- (JSONRPCService*) service [read, write, retain]

The service associated with the method call. You should never affect this @property manually. It will be nil upon the JSONRPCMethodCall creation; after the method has been called on a JSONRPCService, it will contain the service used to call the method.

Generated on Tue Mar 22 22:27:19 2011 for JSONRPC Framework by  doxygen 1.6.3