org.idoox.wasp.serialization
Interface XMLSerializer

All Superinterfaces:
java.io.Serializable, Serializer

public interface XMLSerializer
extends Serializer

This class is responsible for serializing an object to a TokenWriter.

Since:
4.0
Component:
Core

Field Summary
static java.lang.String MECHANISM_TYPE
          JAX-RPC mechanism type.
 
Method Summary
 void grabReferences(java.lang.Object data, SerializationContext context, SerializationChain next)
          Traverses the graph of java objects (pointed by data) and stores objects that will be serialized into context via SerializationContext.registerReference(...)
 void init(Configurable configurable)
          Initializes the serializer.
 void serialize(TokenWriter dataWriter, java.lang.Object data, SerializationContext context, SerializationChain next)
          Serializes the object to the TokenWriter.
 
Methods inherited from interface javax.xml.rpc.encoding.Serializer
getMechanismType
 

Field Detail

MECHANISM_TYPE

public static final java.lang.String MECHANISM_TYPE
JAX-RPC mechanism type. Every serializer that implements this interface must return this constant as a result of getMechanismType() call.

See Also:
Constant Field Values
Method Detail

serialize

public void serialize(TokenWriter dataWriter,
                      java.lang.Object data,
                      SerializationContext context,
                      SerializationChain next)
               throws MessageCreatingException
Serializes the object to the TokenWriter.

Parameters:
dataWriter - a writer to which the object is serialized
data - a data being serialized
context - a schema context, drives the serialization process
next - a serialization chain, holds other possible serializers
Throws:
MessageCreatingException - if something goes wrong

grabReferences

public void grabReferences(java.lang.Object data,
                           SerializationContext context,
                           SerializationChain next)
                    throws MessageCreatingException
Traverses the graph of java objects (pointed by data) and stores objects that will be serialized into context via SerializationContext.registerReference(...)

Parameters:
data - the data being serialized
context - drives the serialization process.
next - a serialization chain, holds other possible serializers
Throws:
MessageCreatingException - if something goes wrong

init

public void init(Configurable configurable)
Initializes the serializer.

Called anytime before the serializer is used.

Parameters:
configurable - the configurable of the serializer