public class ListenerContainerLifecycleManager extends ListenerContainerFactory implements org.springframework.context.SmartLifecycle, org.springframework.beans.factory.DisposableBean
| Constructor and Description |
|---|
ListenerContainerLifecycleManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
registerCluster(org.axonframework.eventhandling.Cluster cluster,
AMQPConsumerConfiguration config,
AMQPMessageConverter messageConverter)
Registers the given
cluster, assigning it to a listener that listens to the given
queueName. |
void |
setDefaultConfiguration(SpringAMQPConsumerConfiguration defaultConfiguration)
Sets the configuration with the entries to use as defaults in case a registered cluster does not provide
explicit values.
|
void |
setPhase(int phase)
Defines the phase in which Spring should manage this beans lifecycle.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
afterPropertiesSet, createContainer, getApplicationContext, setApplicationContext, setConnectionFactorypublic void registerCluster(org.axonframework.eventhandling.Cluster cluster,
AMQPConsumerConfiguration config,
AMQPMessageConverter messageConverter)
cluster, assigning it to a listener that listens to the given
queueName. If no listener is present for the given queueName, it is created. If one
already exists, it is assigned to the existing listener. Clusters that have been registered with the same
queueName will each receive a copy of all message on that queuecluster - The cluster to forward messages toconfig - The configuration object for the clustermessageConverter - The message converter to use to convert the AMQP Message to an Event Messagepublic 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 void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic void setPhase(int phase)
Integer.MAX_VALUE
(), which ensures the containers are started when the rest of the application context
has started, and are the first to shut down.phase - The phase for the lifecycleSmartLifecyclepublic void setDefaultConfiguration(SpringAMQPConsumerConfiguration defaultConfiguration)
defaultConfiguration - The configuration instance containing defaults for each registered clusterCopyright © 2010-2013. All Rights Reserved.