marquee.xmlrpc
Interface XmlRpcCustomSerializer

All Known Implementing Classes:
BooleanArraySerializer, CollectionSerializer, DoubleArraySerializer, FloatArraySerializer, HashtableSerializer, IntArraySerializer, MapSerializer, ObjectArraySerializer, ReflectiveSerializer, Serializer, VectorSerializer

public interface XmlRpcCustomSerializer

Java objects are serialized into XML-RPC values using instances of classes implementing the XmlRpcCustomSerializer class. When processing a parameter for an XML-RPC call, the XmlRpcSerializer will look through its list of XmlRpcCustomSerializer objects for a serializer that matches the object type of the parameter. The getValueClass() returns the Class supported by that serializer.

A number of serializers for common types are already implemented, but you may wish to add custom serializers for special types of Java objects.

Since:
JDK 1.1
Version:
$Revision: 1.4 $
Author:
Greger Ohlson (greger.ohlson@marquee.se)

Method Summary
 java.lang.Class getSupportedClass()
          Returns the class of objects this serializer knows how to handle.
 void serialize(java.lang.Object value, java.lang.StringBuffer output)
          Asks the custom serializer to serialize the supplied value into the supplied string buffer.
 

Method Detail

getSupportedClass

public java.lang.Class getSupportedClass()
Returns the class of objects this serializer knows how to handle.

Returns:
The class of objects interpretable to this serializer.

serialize

public void serialize(java.lang.Object value,
                      java.lang.StringBuffer output)
               throws XmlRpcException
Asks the custom serializer to serialize the supplied value into the supplied string buffer. The supplied value will be of the type reported in getSupportedClass() or of a type extending therefrom.

Parameters:
value - The object to serialize.
output - The buffer to place the serialized data.
Throws:
XmlRpcException - if the value somehow could not be serialized. Many serializers rely on the built in serializer which also may throw this exception.