Package com.opencqrs.framework.types
Interface EventTypeResolver
- All Known Implementing Classes:
ClassNameEventTypeResolver
,PreconfiguredAssignableClassEventTypeResolver
public interface EventTypeResolver
Interface implemented for resolving Java
Class
to EventCandidate.type()
or Event.type()
and
vice versa.-
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.
-
Method Details
-
getEventType
Resolves the given event type for the givenClass
.- Parameters:
clazz
- the Java eventClass
to be resolved- Returns:
- the event type to be used for
EventCandidate.type()
orEvent.type()
- Throws:
EventTypeResolutionException
- in case the type cannot be resolved
-
getJavaClass
Resolved the JavaClass
for the given event type.- Parameters:
eventType
- the event type to be resolved- Returns:
- the Java event
Class
- Throws:
EventTypeResolutionException
- in case theClass
cannot be resolved
-