Class AbstractAnnotationHandlerBeanPostProcessor<I,T extends I>

java.lang.Object
org.axonframework.spring.config.AbstractAnnotationHandlerBeanPostProcessor<I,T>
Type Parameters:
I - The primary interface of the adapter being created
T - The type of adapter created by this class
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.config.BeanPostProcessor
Direct Known Subclasses:
AnnotationCommandHandlerBeanPostProcessor, AnnotationQueryHandlerBeanPostProcessor

@Deprecated public abstract class AbstractAnnotationHandlerBeanPostProcessor<I,T extends I> extends Object implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware
Deprecated.
Replaced by the MessageHandlerLookup and MessageHandlerConfigurer, eliminating the need of an abstract implementation used for command and query registration.
Abstract bean post processor that finds candidates for proxying. Typically used to wrap annotated beans with their respective interface implementations.
Since:
0.4
Author:
Allard Buijze
  • Constructor Details

    • AbstractAnnotationHandlerBeanPostProcessor

      public AbstractAnnotationHandlerBeanPostProcessor()
      Deprecated.
  • Method Details

    • postProcessBeforeInitialization

      public Object postProcessBeforeInitialization(@Nonnull Object bean, @Nonnull String beanName) throws org.springframework.beans.BeansException
      Deprecated.
      Specified by:
      postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • postProcessAfterInitialization

      public Object postProcessAfterInitialization(@Nonnull Object bean, @Nonnull String beanName) throws org.springframework.beans.BeansException
      Deprecated.
      Specified by:
      postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • getAdapterInterfaces

      protected abstract Class<?>[] getAdapterInterfaces()
      Deprecated.
      Returns the interface that the adapter implements to connect the annotated method to the actual interface definition. Calls to methods declared on this interface are passed to the adapter, while other method calls will be forwarded to the annotated object itself.

      Note: this *must* be an interface. It may not be an (abstract) class.

      Returns:
      the interface that the adapter implements to connect the annotated method to the actual interface definition
    • isPostProcessingCandidate

      protected abstract boolean isPostProcessingCandidate(Class<?> targetClass)
      Deprecated.
      Indicates whether an object of the given targetClass should be post processed.
      Parameters:
      targetClass - The type of bean
      Returns:
      true to post process bean of given type, false otherwise
    • initializeAdapterFor

      protected abstract T initializeAdapterFor(Object bean, ParameterResolverFactory parameterResolverFactory, HandlerDefinition handlerDefinition)
      Deprecated.
      Create an AnnotationEventListenerAdapter instance of the given bean. This adapter will receive all event handler calls to be handled by this bean.
      Parameters:
      bean - The bean that the EventListenerAdapter has to adapt
      parameterResolverFactory - The parameter resolver factory that provides the parameter resolvers for the annotated handlers
      handlerDefinition - The handler definition used to create concrete handlers
      Returns:
      an event handler adapter for the given bean
    • setParameterResolverFactory

      public void setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
      Deprecated.
      Sets the ParameterResolverFactory to create the Parameter Resolvers with that provide the parameter values for the handler methods.
      Parameters:
      parameterResolverFactory - The parameter resolver factory to resolve parameter values with
    • setHandlerDefinition

      public void setHandlerDefinition(HandlerDefinition handlerDefinition)
      Deprecated.
      Sets the HandlerDefinition to create concrete handlers.
      Parameters:
      handlerDefinition - The handler definition used to create concrete handlers
    • setBeanFactory

      public void setBeanFactory(@Nonnull org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Deprecated.
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException