|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The data format that this upcaster uses to represent the eventpublic interface ExtendedUpcaster<T>
Extension of the Upcaster interface that allows type upcasting to be based on the contents of the
serialized object. UpcasterChain implementations should invoke the upcast(org.axonframework.serializer.SerializedType,
org.axonframework.serializer.SerializedObject)
on upcasters that implement this interface, instead of upcast(org.axonframework.serializer.SerializedType)
Method Summary | |
---|---|
List<SerializedType> |
upcast(SerializedType serializedType)
Upcast the given serializedType into its new format. |
List<SerializedType> |
upcast(SerializedType serializedType,
SerializedObject<T> intermediateRepresentation)
Upcast the given serializedType into its new format. |
Methods inherited from interface org.axonframework.upcasting.Upcaster |
---|
canUpcast, expectedRepresentationType, upcast |
Method Detail |
---|
List<SerializedType> upcast(SerializedType serializedType, SerializedObject<T> intermediateRepresentation)
serializedType
into its new format. Generally, this involves increasing the
revision. Sometimes, it is also necessary to alter the type's name (in case of a renamed class, for example).
The order and the size of the list returned has to match with the order and size of the list of the upcast
IntermediateRepresentations by this upcaster.
Unlike the upcast(org.axonframework.serializer.SerializedType)
method, this gives you access to the
serialized object to upcast. This may be used to choose the SerializedType based on the contents of a Message's
payload.
Implementations aware of the ExtendedUpcaster interface must use this method instead of upcast(org.axonframework.serializer.SerializedType)
serializedType
- The serialized type to upcastintermediateRepresentation
- The intermediate representation of the object to define the type for
List<SerializedType> upcast(SerializedType serializedType)
serializedType
into its new format. Generally, this involves increasing the
revision. Sometimes, it is also necessary to alter the type's name (in case of a renamed class, for example).
The order and the size of the list returned has to match with the order and size of the list of the upcast
IntermediateRepresentations by this upcaster.
To base the type on the actual contents of the Serialized Object, implement the ExtendedUpcaster
interface instead.
Implementing this method is optional.
upcast
in interface Upcaster<T>
serializedType
- The serialized type to upcast
UnsupportedOperationException
- if the implementation requires the intermediate representation
to upcast the serialized type.upcast(org.axonframework.serializer.SerializedType,
org.axonframework.serializer.SerializedObject)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |