|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.saga.repository.XStreamSagaSerializer
public class XStreamSagaSerializer
Implementation of the SagaSerializer that uses XStream to serialize Saga instances to XML. The serialized form returned by this serializer is more flexible, making it safe to use if the Saga's class definition needs to change, and existing Sagas need to be converted.
| Constructor Summary | |
|---|---|
XStreamSagaSerializer()
Initialize an XStreamSagaSerializer with UTF-8 character set and default XStream instance. |
|
XStreamSagaSerializer(Charset charset,
com.thoughtworks.xstream.XStream xStream)
Initialize an XStreamSagaSerializer with given charset and xStream instance. |
|
XStreamSagaSerializer(com.thoughtworks.xstream.XStream xStream)
Initialize an XStreamSagaSerializer with UTF-8 character set and the given xStream instance. |
|
| Method Summary | |
|---|---|
Saga |
deserialize(byte[] serializedSaga)
Deserializes the given serializedSaga. |
byte[] |
serialize(Saga saga)
Serialize the given saga to a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XStreamSagaSerializer()
public XStreamSagaSerializer(com.thoughtworks.xstream.XStream xStream)
xStream instance.
xStream - The XStream instance to use. Default converters and aliases will be registered to it.
public XStreamSagaSerializer(Charset charset,
com.thoughtworks.xstream.XStream xStream)
charset and xStream instance.
charset - The character set to use to convert the XML to bytes.xStream - The XStream instance to use. Default converters and aliases will be registered to it.| Method Detail |
|---|
public byte[] serialize(Saga saga)
SagaSerializersaga to a byte array.
serialize in interface SagaSerializersaga - The saga to serialize
public Saga deserialize(byte[] serializedSaga)
SagaSerializerserializedSaga.
deserialize in interface SagaSerializerserializedSaga - the bytes representing the serialized form of a Saga
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||