com.flat502.rox.marshal.xmlrpc
Class XmlRpcMethodCall

java.lang.Object
  extended by com.flat502.rox.marshal.xmlrpc.XmlRpcMethod
      extended by com.flat502.rox.marshal.xmlrpc.XmlRpcMethodCall
All Implemented Interfaces:
RpcCall, RpcMethod, XmlRpcConstants

public class XmlRpcMethodCall
extends XmlRpcMethod
implements RpcCall

An instance of this class represents an XML-RPC method call.

This class supports marshalling of XML-RPC method calls, not execution. For that functionality see the XmlRpcClient class.

The relationship between Java and XML-RPC data types is discussed in the description of the XmlRpcMethod class.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.flat502.rox.marshal.xmlrpc.XmlRpcConstants
XmlRpcConstants.ContentTypes, XmlRpcConstants.Formats, XmlRpcConstants.Tags, XmlRpcConstants.Types
 
Constructor Summary
XmlRpcMethodCall(java.lang.String name)
           
XmlRpcMethodCall(java.lang.String name, java.lang.Object[] params)
           
XmlRpcMethodCall(java.lang.String name, java.lang.Object[] params, FieldNameEncoder fieldNameEncoder)
           
 
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.
protected  void marshalImpl(XmlPrinter out)
          The central hook for marshalling for sub-classes.
 
Methods inherited from class com.flat502.rox.marshal.xmlrpc.XmlRpcMethod
getContentType, getHttpMethod, getHttpURI, marshal, marshal, marshal, marshal, marshalValue, setCompactXml
 
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

XmlRpcMethodCall

public XmlRpcMethodCall(java.lang.String name)

XmlRpcMethodCall

public XmlRpcMethodCall(java.lang.String name,
                        java.lang.Object[] params)

XmlRpcMethodCall

public XmlRpcMethodCall(java.lang.String name,
                        java.lang.Object[] params,
                        FieldNameEncoder fieldNameEncoder)
Method Detail

marshalImpl

protected void marshalImpl(XmlPrinter out)
                    throws MarshallingException,
                           java.io.IOException
Description copied from class: XmlRpcMethod
The central hook for marshalling for sub-classes.

Implementations should write their marshalled form to the given stream which has already been initialized with an appropriate encoding.

Specified by:
marshalImpl in class XmlRpcMethod
Parameters:
out - The stream implementations should marshal themselves to.
Throws:
MarshallingException - Implementations may raise an exception if a problem occurs while marshalling is being attempted.
java.io.IOException - Implementations may raise an exception if a problem occurs while writing the marshalled form of this instance out.

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.