@FunctionalInterface public interface EventListener
EventBus
,
DomainEventMessage
,
EventHandler
Modifier and Type | Method and Description |
---|---|
default boolean |
canHandle(EventMessage<?> event)
Indicates whether this listener can handle the given event message
|
void |
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 invoker.
|
default boolean |
supportsReset()
Indicates whether the handlers managed by this invoker support a reset.
|
void handle(EventMessage<?> event) throws Exception
event
- the event to handleException
- when an exception is raised during event handlingdefault boolean canHandle(EventMessage<?> event)
event
- The event message to verifytrue
if this listener can handle the event, otherwise false
default void prepareReset()
default boolean supportsReset()
true
if a reset is supported, otherwise false
Copyright © 2010–2018. All rights reserved.