public class EventHandlerRegistrar extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.SmartLifecycle
To customize this behavior, define a Bean of type EventProcessingModule in the application context:
@Bean
public EventProcessingModule eventProcessing() {
return new EventProcessingModule();
}
| Constructor and Description |
|---|
EventHandlerRegistrar(AxonConfiguration axonConfiguration,
ModuleConfiguration eventProcessingConfiguration,
EventProcessingConfigurer eventProcessingConfigurer)
Initialize the registrar to register beans discovered with the given
eventProcessing. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setEventHandlers(List<Object> beans)
Registers the given
beans as event handlers with the Event Handler Configuration. |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public EventHandlerRegistrar(AxonConfiguration axonConfiguration, ModuleConfiguration eventProcessingConfiguration, EventProcessingConfigurer eventProcessingConfigurer)
eventProcessing.
The registrar will also initialize the EventHandlerConfiguration using the given axonConfiguration
and start it.axonConfiguration - The main Axon Configuration instanceeventProcessingConfigurer - The main Axon Configurationpublic void setEventHandlers(List<Object> beans)
beans as event handlers with the Event Handler Configuration. The beans are sorted
(see AnnotationAwareOrderComparator) before registering them to the configuration.beans - the beans to registerpublic 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.PhasedgetPhase in interface org.springframework.context.SmartLifecyclepublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanCopyright © 2010–2018. All rights reserved.