com.flat502.rox.marshal.xmlrpc
Class XmlRpcMethodResponse

java.lang.Object
  extended by com.flat502.rox.marshal.xmlrpc.XmlRpcMethod
      extended by com.flat502.rox.marshal.xmlrpc.XmlRpcMethodResponse
All Implemented Interfaces:
RpcMethod, RpcResponse, XmlRpcConstants
Direct Known Subclasses:
XmlRpcMethodFault

public class XmlRpcMethodResponse
extends XmlRpcMethod
implements RpcResponse

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

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
XmlRpcMethodResponse(java.lang.Object retVal)
          Initialize an instance with a return value.
XmlRpcMethodResponse(java.lang.Object retVal, FieldNameEncoder fieldNameEncoder)
           
 
Method Summary
 java.lang.Object getReturnValue()
          Get the return value for this instance.
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.RpcMethod
getContentType, marshal
 

Constructor Detail

XmlRpcMethodResponse

public XmlRpcMethodResponse(java.lang.Object retVal)
Initialize an instance with a return value.

Parameters:
retVal - The return value for this instance. A null value is not supported.

XmlRpcMethodResponse

public XmlRpcMethodResponse(java.lang.Object retVal,
                            FieldNameEncoder fieldNameEncoder)
Method Detail

getReturnValue

public java.lang.Object getReturnValue()
Get the return value for this instance.

Specified by:
getReturnValue in interface RpcResponse
Returns:
the return value for this instance, never null.

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.