Enum Class NoOpEventUpcaster

java.lang.Object
java.lang.Enum<NoOpEventUpcaster>
org.axonframework.serialization.upcasting.event.NoOpEventUpcaster
All Implemented Interfaces:
Serializable, Comparable<NoOpEventUpcaster>, Constable, EventUpcaster, Upcaster<IntermediateEventRepresentation>

public enum NoOpEventUpcaster extends Enum<NoOpEventUpcaster> implements EventUpcaster
Event upcaster that does nothing.
Since:
3.0
Author:
Rene de Waele
  • Enum Constant Details

    • INSTANCE

      public static final NoOpEventUpcaster INSTANCE
      Instance of an EventUpcaster that does nothing.
  • Method Details

    • values

      public static NoOpEventUpcaster[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NoOpEventUpcaster valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • upcast

      public Stream<IntermediateEventRepresentation> upcast(Stream<IntermediateEventRepresentation> intermediateRepresentations)
      Description copied from interface: Upcaster
      Apply this upcaster to a stream of intermediateRepresentations and return the altered stream.

      To upcast an object an upcaster should apply a mapping function to the input stream (Stream.map(java.util.function.Function)). To remove an object from the stream the upcaster should filter the input stream (Stream.filter(java.util.function.Predicate)). To split an input object into more than one objects use Stream.flatMap(java.util.function.Function).

      In some cases the upcasting result of an Upcaster may depend on more than one input object. In that case an Upcaster may store state in the method during upcasting or even read ahead in the stream.

      Specified by:
      upcast in interface Upcaster<IntermediateEventRepresentation>
      Parameters:
      intermediateRepresentations - The input stream of representations of objects
      Returns:
      the output stream of representations after applying the upcast function