T - The type of aggregate generated by this aggregate factorypublic class SpringPrototypeAggregateFactory<T> extends Object implements org.axonframework.eventsourcing.AggregateFactory<T>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanNameAware
| Constructor and Description |
|---|
SpringPrototypeAggregateFactory(String prototypeBeanName)
Initializes the factory to create beans instances for the bean with given
prototypeBeanName. |
SpringPrototypeAggregateFactory(String prototypeBeanName,
Map<Class<? extends T>,String> subtypes)
Initializes the factory to create beans instances for the bean with given
prototypeBeanName and its
subtypes. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
T |
createAggregateRoot(String aggregateIdentifier,
org.axonframework.eventhandling.DomainEventMessage<?> firstEvent) |
Class<T> |
getAggregateType() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanName(String beanName) |
public SpringPrototypeAggregateFactory(String prototypeBeanName)
prototypeBeanName.
Note that the the bean should have the prototype scope.
prototypeBeanName - the name of the prototype bean this repository serves.public SpringPrototypeAggregateFactory(String prototypeBeanName, Map<Class<? extends T>,String> subtypes)
prototypeBeanName and its
subtypes.
Note that the the bean should have the prototype scope.
prototypeBeanName - the name of the prototype bean this repository serves.subtypes - the map of subtype of this aggregate to its spring prototype namepublic T createAggregateRoot(String aggregateIdentifier, org.axonframework.eventhandling.DomainEventMessage<?> firstEvent)
createAggregateRoot in interface org.axonframework.eventsourcing.AggregateFactory<T>public Class<T> getAggregateType()
getAggregateType in interface org.axonframework.eventsourcing.AggregateFactory<T>public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic void setBeanName(@Nonnull String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanCopyright © 2010–2022. All rights reserved.