|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.annotation.AnnotationEventListenerAdapter
public class AnnotationEventListenerAdapter
Adapter that turns any bean with EventHandler annotated methods into an EventListener.
EventListener| Constructor Summary | |
|---|---|
AnnotationEventListenerAdapter(Object annotatedEventListener,
EventBus eventBus)
Initialize the AnnotationEventListenerAdapter for the given annotatedEventListener. |
|
| Method Summary | |
|---|---|
Class<?> |
getTargetType()
Returns the instance type that this proxy delegates all event handling to. |
void |
handle(EventMessage event)
Process the given event. |
void |
subscribe()
Subscribe the EventListener with the configured EventBus. |
static AnnotationEventListenerAdapter |
subscribe(Object annotatedEventListener,
EventBus eventBus)
Subscribe the given annotatedEventListener to the given eventBus. |
void |
unsubscribe()
Unsubscribe the EventListener with the configured EventBus. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationEventListenerAdapter(Object annotatedEventListener,
EventBus eventBus)
annotatedEventListener. When the
adapter
subscribes, it will subscribe to the given event bus.
annotatedEventListener - the event listenereventBus - the event bus to register the event listener to| Method Detail |
|---|
public static AnnotationEventListenerAdapter subscribe(Object annotatedEventListener,
EventBus eventBus)
annotatedEventListener to the given eventBus.
annotatedEventListener - The annotated event listenereventBus - The event bus to subscribe to
public void handle(EventMessage event)
handle in interface EventListenerevent - the event to handle@PreDestroy public void unsubscribe()
unsubscribe in interface Subscribable@PostConstruct public void subscribe()
subscribe in interface Subscribablepublic Class<?> getTargetType()
EventListenerProxy
getTargetType in interface EventListenerProxy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||