public interface EventMessageHandler extends MessageHandler<EventMessage<?>>
EventBus
,
DomainEventMessage
,
EventHandler
Modifier and Type | Method and Description |
---|---|
Object |
handle(EventMessage<?> event)
Process the given event.
|
default void |
prepareReset()
Performs any activities that are required to reset the state managed by handlers assigned to this handler.
|
default <R> void |
prepareReset(R resetContext)
Performs any activities that are required to reset the state managed by handlers assigned to this handler.
|
default boolean |
supportsReset()
Indicates whether the handlers managed by this invoker support a reset.
|
canHandle, canHandleType, getTargetType
Object handle(EventMessage<?> event) throws Exception
handle
in interface MessageHandler<EventMessage<?>>
event
- the event to handleException
- when an exception is raised during event handlingdefault void prepareReset()
default <R> void prepareReset(R resetContext)
R
- the type of the provided resetContext
resetContext
- a R
used to support the reset operationdefault boolean supportsReset()
true
if a reset is supported, otherwise false
Copyright © 2010–2024. All rights reserved.