org.axonframework.eventstore.legacy
Class LegacyAxonEventUpcaster
java.lang.Object
org.axonframework.eventstore.legacy.LegacyAxonEventUpcaster
- All Implemented Interfaces:
- EventUpcaster<org.dom4j.Document>
public class LegacyAxonEventUpcaster
- extends Object
- implements EventUpcaster<org.dom4j.Document>
Event preprocessor that upcasts events serialized by the XStreamEventSerializer in versions 0.6 and prior of
AxonFramework, to the event format supported since 0.7.
This upcaster uses dom4j Document as event representation, which is supported by the XStreamEventSerializer.
- Since:
- 0.7
- Author:
- Allard Buijze
|
Method Summary |
Class<org.dom4j.Document> |
getSupportedRepresentation()
Since Java's generics are erased, this method allows serializers to verify the supported event representation of
this upcaster. |
org.dom4j.Document |
upcast(org.dom4j.Document event)
Upcast the given event to make it parsable by the EventSerializer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LegacyAxonEventUpcaster
public LegacyAxonEventUpcaster()
getSupportedRepresentation
public Class<org.dom4j.Document> getSupportedRepresentation()
- Description copied from interface:
EventUpcaster
- Since Java's generics are erased, this method allows serializers to verify the supported event representation of
this upcaster. Serializers may support any number of formats, and are responsible for the transformation between
them if they accept more than one.
- Specified by:
getSupportedRepresentation in interface EventUpcaster<org.dom4j.Document>
- Returns:
- The type of representation supported by this upcaster
upcast
public org.dom4j.Document upcast(org.dom4j.Document event)
- Description copied from interface:
EventUpcaster
- Upcast the given
event to make it parsable by the EventSerializer. Implementations may alter the
given event, and return a reference to the same instance.
- Specified by:
upcast in interface EventUpcaster<org.dom4j.Document>
- Parameters:
event - The serialized event. This instance may have been processed by other upcasters.
- Returns:
- The instance to use for further upcasting or deserialization
Copyright © 2011. All Rights Reserved.