com.flat502.rox.marshal
Class AbstractRpcCall

java.lang.Object
  extended by com.flat502.rox.marshal.AbstractRpcCall
All Implemented Interfaces:
RpcCall, RpcMethod

public abstract class AbstractRpcCall
extends java.lang.Object
implements RpcCall

An abstract implementation of the RpcCall interface.

This interface handles the "drudgery" of storing the method name and parameters and the implementation of RpcCall.getName() and RpcCall.getParameters().


Constructor Summary
AbstractRpcCall(java.lang.String name, java.lang.Object[] params)
          Initializes a new instance of this class
 
Method Summary
 java.lang.String getName()
          Get the method name to invoke (or being invoked).
 java.lang.Object[] getParameters()
          Get a list of parameters to pass to (or that were passed to) this method call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.flat502.rox.marshal.RpcCall
getHttpMethod, getHttpURI
 
Methods inherited from interface com.flat502.rox.marshal.RpcMethod
getContentType, marshal
 

Constructor Detail

AbstractRpcCall

public AbstractRpcCall(java.lang.String name,
                       java.lang.Object[] params)
Initializes a new instance of this class

If params is null a new zero-length array is created and stored in place of it.

Parameters:
name - The name of the method. May not be null.
params - The method parameters. May be null.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: RpcCall
Get the method name to invoke (or being invoked).

Specified by:
getName in interface RpcCall
Returns:
The name of the RPC method this instance represents.

getParameters

public java.lang.Object[] getParameters()
Description copied from interface: RpcCall
Get a list of parameters to pass to (or that were passed to) this method call.

Implementations must not return null. If no parameters exist a zero length array should be returned to simplify logic that depends on this method.

Specified by:
getParameters in interface RpcCall
Returns:
An array containing the parameters associated with this RPC method call. Never null.