|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.common.annotation.AbstractAnnotationHandlerBeanPostProcessor<EventListener,AnnotationEventListenerAdapter>
org.axonframework.eventhandling.annotation.AnnotationEventListenerBeanPostProcessor
public class AnnotationEventListenerBeanPostProcessor
Spring Bean post processor that automatically generates an adapter for each bean containing EventHandler
annotated methods.
| Constructor Summary | |
|---|---|
AnnotationEventListenerBeanPostProcessor()
|
|
| Method Summary | |
|---|---|
protected Class<EventListener> |
getAdapterInterface()
Returns the interface that the adapter implements to connect the annotated method to the actual interface definition. |
protected AnnotationEventListenerAdapter |
initializeAdapterFor(Object bean,
ParameterResolverFactory parameterResolverFactory)
Create an AnnotationEventListenerAdapter instance of the given bean. |
protected boolean |
isPostProcessingCandidate(Class<?> targetClass)
Indicates whether an object of the given targetClass should be post processed. |
void |
setEventBus(EventBus eventBus)
Sets the event bus to which detected event listeners should be subscribed. |
protected void |
subscribe(EventListener bean,
AnnotationEventListenerAdapter adapter)
Subscribe the given proxy bean (with its annotated methods managed by given adapter)
to the messaging infrastructure. |
protected void |
unsubscribe(EventListener bean,
AnnotationEventListenerAdapter adapter)
Unsubscribe the given proxy bean (with its annotated methods managed by given adapter)
to the messaging infrastructure. |
| Methods inherited from class org.axonframework.common.annotation.AbstractAnnotationHandlerBeanPostProcessor |
|---|
getApplicationContext, getPhase, isAutoStartup, isRunning, postProcessAfterInitialization, postProcessBeforeDestruction, postProcessBeforeInitialization, setApplicationContext, setParameterResolverFactory, setPhase, setUnsubscribeOnShutdown, start, stop, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.context.SmartLifecycle |
|---|
isAutoStartup, stop |
| Methods inherited from interface org.springframework.context.Lifecycle |
|---|
isRunning, start, stop |
| Methods inherited from interface org.springframework.context.Phased |
|---|
getPhase |
| Constructor Detail |
|---|
public AnnotationEventListenerBeanPostProcessor()
| Method Detail |
|---|
protected Class<EventListener> getAdapterInterface()
AbstractAnnotationHandlerBeanPostProcessor
getAdapterInterface in class AbstractAnnotationHandlerBeanPostProcessor<EventListener,AnnotationEventListenerAdapter>
protected AnnotationEventListenerAdapter initializeAdapterFor(Object bean,
ParameterResolverFactory parameterResolverFactory)
AbstractAnnotationHandlerBeanPostProcessorbean. This adapter will receive all event
handler calls to be handled by this bean.
initializeAdapterFor in class AbstractAnnotationHandlerBeanPostProcessor<EventListener,AnnotationEventListenerAdapter>bean - The bean that the EventListenerAdapter has to adaptparameterResolverFactory - The parameter resolver factory that provides the parameter resolvers for the
annotated handlers
beanprotected boolean isPostProcessingCandidate(Class<?> targetClass)
AbstractAnnotationHandlerBeanPostProcessortargetClass should be post processed.
isPostProcessingCandidate in class AbstractAnnotationHandlerBeanPostProcessor<EventListener,AnnotationEventListenerAdapter>targetClass - The type of bean
protected void subscribe(EventListener bean,
AnnotationEventListenerAdapter adapter)
AbstractAnnotationHandlerBeanPostProcessorbean (with its annotated methods managed by given adapter)
to the messaging infrastructure.
subscribe in class AbstractAnnotationHandlerBeanPostProcessor<EventListener,AnnotationEventListenerAdapter>bean - The bean to subscribeadapter - The adapter wrapping the bean
protected void unsubscribe(EventListener bean,
AnnotationEventListenerAdapter adapter)
AbstractAnnotationHandlerBeanPostProcessorbean (with its annotated methods managed by given adapter)
to the messaging infrastructure.
unsubscribe in class AbstractAnnotationHandlerBeanPostProcessor<EventListener,AnnotationEventListenerAdapter>bean - The bean to unsubscribeadapter - The adapter wrapping the beanpublic void setEventBus(EventBus eventBus)
eventBus - the event bus to subscribe detected event listeners to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||