|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.common.annotation.AbstractAnnotationHandlerBeanPostProcessor<I,T>
I - The primary interface of the adapter being createdT - The type of adapter created by this classpublic abstract class AbstractAnnotationHandlerBeanPostProcessor<I,T extends I>
Abstract bean post processor that finds candidates for proxying. Typically used to wrap annotated beans with their respective interface implementations.
| Constructor Summary | |
|---|---|
AbstractAnnotationHandlerBeanPostProcessor()
|
|
| Method Summary | |
|---|---|
protected abstract Class<I> |
getAdapterInterface()
Returns the interface that the adapter implements to connect the annotated method to the actual interface definition. |
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Returns the ApplicationContext this Bean Post Processor is registered in. |
int |
getPhase()
|
protected abstract T |
initializeAdapterFor(Object bean,
ParameterResolverFactory parameterResolverFactory)
Create an AnnotationEventListenerAdapter instance of the given bean. |
boolean |
isAutoStartup()
|
protected abstract boolean |
isPostProcessingCandidate(Class<?> targetClass)
Indicates whether an object of the given targetClass should be post processed. |
boolean |
isRunning()
|
Object |
postProcessAfterInitialization(Object bean,
String beanName)
|
void |
postProcessBeforeDestruction(Object bean,
String beanName)
|
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
Sets the ParameterResolverFactory to create the Parameter Resolvers with that provide the parameter values for the handler methods. |
void |
setPhase(int phase)
Sets the phase in which handlers are subscribed and unsubscribed. |
void |
setUnsubscribeOnShutdown(boolean unsubscribeOnShutdown)
Indicates whether handlers should be unsubscribed on shutdown. |
void |
start()
|
void |
stop()
|
void |
stop(Runnable callback)
|
protected abstract void |
subscribe(I bean,
T adapter)
Subscribe the given proxy bean (with its annotated methods managed by given adapter)
to the messaging infrastructure. |
protected abstract void |
unsubscribe(I bean,
T adapter)
Unsubscribe the given proxy bean (with its annotated methods managed by given adapter)
to the messaging infrastructure. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractAnnotationHandlerBeanPostProcessor()
| Method Detail |
|---|
public Object postProcessBeforeInitialization(Object bean,
String beanName)
throws org.springframework.beans.BeansException
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansException
public Object postProcessAfterInitialization(Object bean,
String beanName)
throws org.springframework.beans.BeansException
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionprotected abstract Class<I> getAdapterInterface()
protected abstract boolean isPostProcessingCandidate(Class<?> targetClass)
targetClass should be post processed.
targetClass - The type of bean
public boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void stop(Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic void setPhase(int phase)
phase - The phase in which handlers are subscribed and unsubscribed
public void postProcessBeforeDestruction(Object bean,
String beanName)
throws org.springframework.beans.BeansException
postProcessBeforeDestruction in interface org.springframework.beans.factory.config.DestructionAwareBeanPostProcessororg.springframework.beans.BeansException
protected abstract void subscribe(I bean,
T adapter)
bean (with its annotated methods managed by given adapter)
to the messaging infrastructure.
bean - The bean to subscribeadapter - The adapter wrapping the bean
protected abstract void unsubscribe(I bean,
T adapter)
bean (with its annotated methods managed by given adapter)
to the messaging infrastructure.
bean - The bean to unsubscribeadapter - The adapter wrapping the bean
protected abstract T initializeAdapterFor(Object bean,
ParameterResolverFactory parameterResolverFactory)
bean. This adapter will receive all event
handler calls to be handled by this bean.
bean - The bean that the EventListenerAdapter has to adaptparameterResolverFactory - The parameter resolver factory that provides the parameter resolvers for the
annotated handlers
beanprotected org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setUnsubscribeOnShutdown(boolean unsubscribeOnShutdown)
true.
unsubscribeOnShutdown - true to unsubscribe beans explicitly from their command/event bus or
false to shutdown without unsubscribing explicitly.public void setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
parameterResolverFactory - The parameter resolver factory to resolve parameter values with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||