public static class EventTypeUpcaster.Builder extends Object
EventTypeUpcaster
.Constructor and Description |
---|
Builder(String expectedPayloadType,
String expectedRevision)
Instantiate a
EventTypeUpcaster.Builder as a shorthand to create an EventTypeUpcaster . |
Modifier and Type | Method and Description |
---|---|
EventTypeUpcaster |
to(Class<?> payloadType,
String revision)
|
EventTypeUpcaster |
to(String payloadType,
String revision)
|
public Builder(String expectedPayloadType, String expectedRevision)
EventTypeUpcaster.Builder
as a shorthand to create an EventTypeUpcaster
.expectedPayloadType
- the expected event payload type this upcaster should react onexpectedRevision
- the expected event revision this upcaster should react onpublic EventTypeUpcaster to(Class<?> payloadType, String revision)
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
.payloadType
- the payload type the upcaster should upcast "to"revision
- the revision the upcaster should upcast "to"EventTypeUpcaster
upcasting "to" the given payloadType
and revision
public EventTypeUpcaster to(String payloadType, String revision)
payloadType
- the payload type the upcaster should upcast "to"revision
- the revision the upcaster should upcast "to"EventTypeUpcaster
upcasting "to" the given payloadType
and revision
Copyright © 2010–2020. All rights reserved.