org.axonframework.upcasting
Class UpcastUtils

java.lang.Object
  extended by org.axonframework.upcasting.UpcastUtils

public abstract class UpcastUtils
extends Object

Utility class that optimizes tasks related to upcasting.

Since:
2.1
Author:
Allard Buijze

Method Summary
static List<DomainEventMessage> upcastAndDeserialize(SerializedDomainEventData entry, Object aggregateIdentifier, Serializer serializer, UpcasterChain upcasterChain, boolean skipUnknownTypes)
          Upcasts and deserializes the given entry using the given serializer and upcasterChain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

upcastAndDeserialize

public static List<DomainEventMessage> upcastAndDeserialize(SerializedDomainEventData entry,
                                                            Object aggregateIdentifier,
                                                            Serializer serializer,
                                                            UpcasterChain upcasterChain,
                                                            boolean skipUnknownTypes)
Upcasts and deserializes the given entry using the given serializer and upcasterChain. This code is optimized to deserialize the meta-data only once in case it has been used in the upcasting process.

The list of events returned contains lazy deserializing events for optimization purposes. Events represented with unknown classes are ignored, and not returned.

Parameters:
entry - the entry containing the data of the serialized event
aggregateIdentifier - the original aggregate identifier to use in the deserialized events or null to use the deserialized version
serializer - the serializer to deserialize the event with
upcasterChain - the chain containing the upcasters to upcast the events with
skipUnknownTypes - whether unknown serialized types should be ignored
Returns:
a list of upcast and deserialized events


Copyright © 2010-2016. All Rights Reserved.