public class CommandHandlerSubscriber extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.SmartLifecycle
Constructor and Description |
---|
CommandHandlerSubscriber() |
Modifier and Type | Method and Description |
---|---|
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setCommandBus(CommandBus commandBus)
Sets the command bus to use when subscribing command handlers.
|
void |
setCommandHandlers(Collection<MessageHandler> commandHandlers)
Sets the command handlers to subscribe to the bus.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public void setCommandBus(CommandBus commandBus)
commandBus
- the command bus to use when subscribing handlerspublic void setCommandHandlers(Collection<MessageHandler> commandHandlers)
MessageHandler
that can handle commands.commandHandlers
- command handlers to subscribe to the command buspublic boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
getPhase
in interface org.springframework.context.SmartLifecycle
Copyright © 2010–2022. All rights reserved.