Package com.opencqrs.framework.types
Class ClassNameEventTypeResolver
java.lang.Object
com.opencqrs.framework.types.ClassNameEventTypeResolver
- All Implemented Interfaces:
EventTypeResolver
EventTypeResolver
implementation that maps Class.getName()
to event
type and vice versa.
The use of this EventTypeResolver
implementation is discouraged with respect to interoperability (with
non-Java applications operating on the same events) and refactoring.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEventType
(Class<?> clazz) Resolves the given event type for the givenClass
.Class
<?> getJavaClass
(String eventType) Resolved the JavaClass
for the given event type.
-
Constructor Details
-
ClassNameEventTypeResolver
-
-
Method Details
-
getEventType
Description copied from interface:EventTypeResolver
Resolves the given event type for the givenClass
.- Specified by:
getEventType
in interfaceEventTypeResolver
- Parameters:
clazz
- the Java eventClass
to be resolved- Returns:
- the event type to be used for
EventCandidate.type()
orEvent.type()
-
getJavaClass
Description copied from interface:EventTypeResolver
Resolved the JavaClass
for the given event type.- Specified by:
getJavaClass
in interfaceEventTypeResolver
- Parameters:
eventType
- the event type to be resolved- Returns:
- the Java event
Class
-