T - The aggregate type on which command handlers are declared.public class AggregateAnnotationCommandHandlerFactoryBean<T extends AggregateRoot<?>> extends Object implements org.springframework.beans.factory.FactoryBean<AggregateAnnotationCommandHandler<T>>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
| Constructor and Description |
|---|
AggregateAnnotationCommandHandlerFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
AggregateAnnotationCommandHandler<T> |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setAggregateType(Class<T> aggregateType)
Sets the type of aggregate to inspect for annotations.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setCommandBus(CommandBus commandBus)
Sets the CommandBus to subscribe the handler to
|
void |
setCommandTargetResolver(CommandTargetResolver commandTargetResolver)
The resolver providing the identifier (and version) of the aggregate a command targets.
|
void |
setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
Sets the ParameterResolverFactory to create parameter resolver instances with.
|
void |
setRepository(Repository<T> repository)
The repository from which to load aggregate instances.
|
public AggregateAnnotationCommandHandlerFactoryBean()
public AggregateAnnotationCommandHandler<T> getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<AggregateAnnotationCommandHandler<T extends AggregateRoot<?>>>Exceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<AggregateAnnotationCommandHandler<T extends AggregateRoot<?>>>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<AggregateAnnotationCommandHandler<T extends AggregateRoot<?>>>public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setCommandBus(CommandBus commandBus)
commandBus - the CommandBus to subscribe the handler topublic void setAggregateType(Class<T> aggregateType)
aggregateType - the type of aggregate to inspect for annotationspublic void setRepository(Repository<T> repository)
repository - the Repository from which to load aggregate instances.public void setCommandTargetResolver(CommandTargetResolver commandTargetResolver)
AnnotationCommandTargetResolver.commandTargetResolver - The CommandTargetResolver to resolve the target aggregate withpublic void setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
ClasspathParameterResolverFactory that uses the aggregateType's class
loader.parameterResolverFactory - the ParameterResolverFactory to create parameter resolver instances with.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2010-2014. All Rights Reserved.