|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object redstone.xmlrpc.XmlRpcSerializer
public class XmlRpcSerializer
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 Redstone XML-RPC library comes with a set of useful serializers for collections and other types of objects. @see the redstone.xmlrpc.serializers . TODO Change synchronization of global dateFormatter to prevent bottleneck.
Constructor Summary | |
---|---|
XmlRpcSerializer()
Constructor adding all core custom serializers. |
|
XmlRpcSerializer(boolean addCustomSerializers)
Constructor that may add all the custom serializers in the library (which is almost always what you want). |
Method Summary | |
---|---|
void |
addCustomSerializer(XmlRpcCustomSerializer customSerializer)
Registers a custom serializer. |
void |
removeCustomSerializer(XmlRpcCustomSerializer customSerializer)
Unregisters a previously registered custom serializer. |
void |
serialize(java.lang.Object value,
java.io.Writer writer)
Converts the supplied Java object to its XML-RPC counterpart according to the XML-RPC specification. |
void |
writeEnvelopeFooter(java.lang.Object value,
java.io.Writer writer)
|
void |
writeEnvelopeHeader(java.lang.Object value,
java.io.Writer writer)
|
void |
writeError(java.lang.String message,
java.io.Writer writer)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlRpcSerializer()
public XmlRpcSerializer(boolean addCustomSerializers)
addCustomSerializers
- Indicates if the core custom serializers should be added.Method Detail |
---|
public void writeEnvelopeHeader(java.lang.Object value, java.io.Writer writer) throws java.io.IOException
writer
-
java.io.IOException
public void writeEnvelopeFooter(java.lang.Object value, java.io.Writer writer) throws java.io.IOException
value
- writer
-
java.io.IOException
public void writeError(java.lang.String message, java.io.Writer writer) throws java.io.IOException
message
- writer
-
java.io.IOException
public void serialize(java.lang.Object value, java.io.Writer writer) throws XmlRpcException, java.io.IOException
XmlRpcException
java.io.IOException
public void addCustomSerializer(XmlRpcCustomSerializer customSerializer)
public void removeCustomSerializer(XmlRpcCustomSerializer customSerializer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |