Class EventTypeUpcaster.Builder

java.lang.Object
org.axonframework.serialization.upcasting.event.EventTypeUpcaster.Builder
Enclosing class:
EventTypeUpcaster

public static class EventTypeUpcaster.Builder extends Object
Builder class to instantiate an EventTypeUpcaster.
  • Constructor Details

    • Builder

      public Builder(String expectedPayloadType, String expectedRevision)
      Instantiate a EventTypeUpcaster.Builder as a shorthand to create an EventTypeUpcaster.
      Parameters:
      expectedPayloadType - the expected event payload type this upcaster should react on
      expectedRevision - the expected event revision this upcaster should react on
  • Method Details

    • to

      public EventTypeUpcaster to(Class<?> payloadType, String revision)
      Create an EventTypeUpcaster which upcasts "to" the given payloadType and revision. This method will use the fully qualified class name of the given payloadType as the upcastedPayloadType.
      Parameters:
      payloadType - the payload type the upcaster should upcast "to"
      revision - the revision the upcaster should upcast "to"
      Returns:
      an EventTypeUpcaster upcasting "to" the given payloadType and revision
    • to

      public EventTypeUpcaster to(String payloadType, String revision)
      Create an EventTypeUpcaster which upcasts "to" the given payloadType and revision.
      Parameters:
      payloadType - the payload type the upcaster should upcast "to"
      revision - the revision the upcaster should upcast "to"
      Returns:
      an EventTypeUpcaster upcasting "to" the given payloadType and revision