com.flat502.rox.marshal.xmlrpc
Class DomMethodCallUnmarshaller

java.lang.Object
  extended by com.flat502.rox.marshal.xmlrpc.XmlRpcMethodUnmarshaller
      extended by com.flat502.rox.marshal.xmlrpc.DomUnmarshaller
          extended by com.flat502.rox.marshal.xmlrpc.DomMethodCallUnmarshaller
All Implemented Interfaces:
ExtendedMethodCallUnmarshaller, MethodCallUnmarshaller, MethodUnmarshaller, XmlRpcConstants

public class DomMethodCallUnmarshaller
extends DomUnmarshaller
implements ExtendedMethodCallUnmarshaller

A DOM basedMethodCallUnmarshaller implementation.


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
DomMethodCallUnmarshaller()
           
DomMethodCallUnmarshaller(FieldNameCodec fieldNameCodec)
           
 
Method Summary
 RpcCall unmarshal(java.io.InputStream in)
          Unmarshal an RpcCall instance from an InputStream.
 RpcCall unmarshal(java.io.InputStream in, java.lang.Class[] structClasses)
          Unmarshal an RpcCall instance from an InputStream.
 RpcCall unmarshal(java.io.InputStream in, MethodCallUnmarshallerAid aid)
          Unmarshal an RpcCall instance from an InputStream.
 RpcCall unmarshal(java.io.Reader in)
          Unmarshal an RpcCall instance from a Reader.
 RpcCall unmarshal(java.io.Reader in, java.lang.Class[] structClasses)
          Unmarshal an RpcCall instance from a Reader.
 RpcCall unmarshal(java.io.Reader in, MethodCallUnmarshallerAid aid)
          Unmarshal an RpcCall instance from a Reader.
 RpcCall unmarshal(java.lang.String xml)
          Unmarshal an RpcCall instance from an XML string.
 RpcCall unmarshal(java.lang.String xml, java.lang.Class[] structClasses)
          Unmarshal an RpcCall instance from an XML string.
 RpcCall unmarshal(java.lang.String xml, MethodCallUnmarshallerAid aid)
          Unmarshal an RpcCall instance from an XML string.
 
Methods inherited from class com.flat502.rox.marshal.xmlrpc.DomUnmarshaller
expectTag, parse, parseArrayData, parseMemberName, parseMethodResponse, parseParam, parseStruct, parseStruct, parseUnknownType, parseValue, parseValue
 
Methods inherited from class com.flat502.rox.marshal.xmlrpc.XmlRpcMethodUnmarshaller
decodeFieldName, getDateFormat, getDefaultFieldNameCodec, getFieldNameCodec, getStructMemberType, newDateFormat, newStructObject, parseBase64, parseBoolean, parseDate, parseDouble, parseEnum, parseInt, parseString, parseString, setObjectMember
 
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.MethodUnmarshaller
getDefaultFieldNameCodec
 

Constructor Detail

DomMethodCallUnmarshaller

public DomMethodCallUnmarshaller()

DomMethodCallUnmarshaller

public DomMethodCallUnmarshaller(FieldNameCodec fieldNameCodec)
Method Detail

unmarshal

public RpcCall unmarshal(java.io.InputStream in)
                  throws java.lang.Exception
Description copied from interface: ExtendedMethodCallUnmarshaller
Unmarshal an RpcCall instance from an InputStream.

Implementations are responsible for determining the stream's character encoding (where applicable).

Specified by:
unmarshal in interface ExtendedMethodCallUnmarshaller
Parameters:
in - The InputStream from which to unmarshal a new RpcCall instance.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.io.InputStream in,
                         java.lang.Class[] structClasses)
                  throws java.lang.Exception
Description copied from interface: ExtendedMethodCallUnmarshaller
Unmarshal an RpcCall instance from an InputStream.

Implementations are responsible for determining the stream's character encoding (where applicable).

Specified by:
unmarshal in interface ExtendedMethodCallUnmarshaller
Parameters:
in - The InputStream from which to unmarshal a new RpcCall instance.
structClasses - A list of classes to unmarshal parameters into if said parameters are structs. May be null, in which case Map instances will be used in all cases. Parameters are indexed into this array based on their position. If this index exceeds the length of this array, or if the indexed element is null a Map instance will be used.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.io.InputStream in,
                         MethodCallUnmarshallerAid aid)
                  throws java.lang.Exception
Description copied from interface: MethodCallUnmarshaller
Unmarshal an RpcCall instance from an InputStream.

Implementations are responsible for determining the stream's character encoding (where applicable).

Specified by:
unmarshal in interface MethodCallUnmarshaller
Parameters:
in - The InputStream from which to unmarshal a new RpcCall instance.
aid - A MethodCallUnmarshallerAid providing the mapping between method parameters when unmarshalling structs. May be null, in which case Map instances will be used in all cases. May also override the default FieldNameCodec.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.io.Reader in)
                  throws java.lang.Exception
Description copied from interface: ExtendedMethodCallUnmarshaller
Unmarshal an RpcCall instance from a Reader.

Specified by:
unmarshal in interface ExtendedMethodCallUnmarshaller
Parameters:
in - The Reader from which to unmarshal a new RpcCall instance.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.io.Reader in,
                         java.lang.Class[] structClasses)
                  throws java.lang.Exception
Description copied from interface: ExtendedMethodCallUnmarshaller
Unmarshal an RpcCall instance from a Reader.

Specified by:
unmarshal in interface ExtendedMethodCallUnmarshaller
Parameters:
in - The Reader from which to unmarshal a new RpcCall instance.
structClasses - A list of classes to unmarshal parameters into if said parameters are structs. May be null, in which case Map instances will be used in all cases. Parameters are indexed into this array based on their position. If this index exceeds the length of this array, or if the indexed element is null a Map instance will be used.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.io.Reader in,
                         MethodCallUnmarshallerAid aid)
                  throws java.lang.Exception
Description copied from interface: MethodCallUnmarshaller
Unmarshal an RpcCall instance from a Reader.

Specified by:
unmarshal in interface MethodCallUnmarshaller
Parameters:
in - The Reader from which to unmarshal a new RpcCall instance.
aid - A MethodCallUnmarshallerAid providing the mapping between method parameters when unmarshalling structs. May be null, in which case Map instances will be used in all cases. May also override the default FieldNameCodec.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.lang.String xml)
                  throws java.lang.Exception
Description copied from interface: ExtendedMethodCallUnmarshaller
Unmarshal an RpcCall instance from an XML string.

Specified by:
unmarshal in interface ExtendedMethodCallUnmarshaller
Parameters:
xml - The XML string from which to unmarshal a new RpcCall instance.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.lang.String xml,
                         java.lang.Class[] structClasses)
                  throws java.lang.Exception
Description copied from interface: ExtendedMethodCallUnmarshaller
Unmarshal an RpcCall instance from an XML string.

Specified by:
unmarshal in interface ExtendedMethodCallUnmarshaller
Parameters:
xml - The XML string from which to unmarshal a new RpcCall instance.
structClasses - A list of classes to unmarshal parameters into if said parameters are structs. May be null, in which case Map instances will be used in all cases. Parameters are indexed into this array based on their position. If this index exceeds the length of this array, or if the indexed element is null a Map instance will be used.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.

unmarshal

public RpcCall unmarshal(java.lang.String xml,
                         MethodCallUnmarshallerAid aid)
                  throws java.lang.Exception
Description copied from interface: MethodCallUnmarshaller
Unmarshal an RpcCall instance from an XML string.

Specified by:
unmarshal in interface MethodCallUnmarshaller
Parameters:
xml - The XML string from which to unmarshal a new RpcCall instance.
aid - A MethodCallUnmarshallerAid providing the mapping between method parameters when unmarshalling structs. May be null, in which case Map instances will be used in all cases. May also override the default FieldNameCodec.
Returns:
A new instance of this class representing the XML structure in the given document.
Throws:
java.lang.Exception - Implementations are free to throw exceptions.