marquee.xmlrpc
Class XmlRpcSerializer

java.lang.Object
  extended bymarquee.xmlrpc.XmlRpcSerializer

public class XmlRpcSerializer
extends java.lang.Object

The XmlRpcSerializer class converts Java objects to their XML-RPC counterparts according to the XML-RPC specification. It inherently supports basic object types like String, Integer, Double, Float, Boolean, Date, and byte arrays. For other types of objects, custom serializers need to be registered. The Marqu?e XML-RPC library comes with a set of useful serializers for collections and other types of objects (see the marquee.xmlrpc.serializers package).

Since:
JDK 1.1
Version:
$Revision: 1.5 $
Author:
Greger Ohlson (greger.ohlson@marquee.se), Rainer Bischof (rainer.bischof@eds.com)

Constructor Summary
XmlRpcSerializer()
           
 
Method Summary
static void registerCustomSerializer(XmlRpcCustomSerializer customSerializer)
          Registers a custom serializer.
static void serialize(java.lang.Object value, java.lang.StringBuffer output)
          Converts the supplied Java object to its XML-RPC counterpart according to the XML-RPC specification.
static void unregisterCustomSerializer(XmlRpcCustomSerializer customSerializer)
          Unregisters a previously registered custom serializer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcSerializer

public XmlRpcSerializer()
Method Detail

serialize

public static void serialize(java.lang.Object value,
                             java.lang.StringBuffer output)
                      throws XmlRpcException
Converts the supplied Java object to its XML-RPC counterpart according to the XML-RPC specification.

Throws:
XmlRpcException

registerCustomSerializer

public static void registerCustomSerializer(XmlRpcCustomSerializer customSerializer)
Registers a custom serializer. The serializer is placed the list of serializers before more general serializers from the same inheritance tree. That is, adding a serializer supporting serialization of java.util.Vector will be placed before a serializer for java.util.Collection. In other words, when serializing an object of type Vector, the java.util.Vector serializer will override a more general java.util.Collection serializer.


unregisterCustomSerializer

public static void unregisterCustomSerializer(XmlRpcCustomSerializer customSerializer)
Unregisters a previously registered custom serializer.