public class PublishSubscribeAmqpChannel extends AbstractAmqpChannel
AbstractMessageChannel.ChannelInterceptorList
logger
Constructor and Description |
---|
PublishSubscribeAmqpChannel(java.lang.String channelName,
org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer container,
org.springframework.amqp.core.AmqpTemplate amqpTemplate) |
Modifier and Type | Method and Description |
---|---|
protected AbstractDispatcher |
createDispatcher() |
void |
destroy() |
protected java.lang.String |
getExchangeName()
Subclasses may override this method to return an Exchange name.
|
int |
getPhase() |
protected org.springframework.amqp.core.Queue |
initializeQueue(org.springframework.amqp.core.AmqpAdmin admin,
java.lang.String channelName) |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setExchange(org.springframework.amqp.core.FanoutExchange exchange)
Configure the FanoutExchange instance.
|
void |
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the
channel's dispatcher (if it is an
AbstractDispatcher ). |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
boolean |
subscribe(MessageHandler handler)
Register a
MessageHandler as a subscriber to this channel. |
boolean |
unsubscribe(MessageHandler handler)
Remove a
MessageHandler from the subscribers of this channel. |
doSend, getRoutingKey
addInterceptor, getComponentType, getFullChannelName, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
getComponentName
public PublishSubscribeAmqpChannel(java.lang.String channelName, org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer container, org.springframework.amqp.core.AmqpTemplate amqpTemplate)
public void setExchange(org.springframework.amqp.core.FanoutExchange exchange)
protected org.springframework.amqp.core.Queue initializeQueue(org.springframework.amqp.core.AmqpAdmin admin, java.lang.String channelName)
protected AbstractDispatcher createDispatcher()
protected java.lang.String getExchangeName()
AbstractAmqpChannel
getExchangeName
in class AbstractAmqpChannel
public void setMaxSubscribers(int maxSubscribers)
AbstractDispatcher
).maxSubscribers
- public boolean subscribe(MessageHandler handler)
SubscribableChannel
MessageHandler
as a subscriber to this channel.subscribe
in interface SubscribableChannel
public boolean unsubscribe(MessageHandler handler)
SubscribableChannel
MessageHandler
from the subscribers of this channel.unsubscribe
in interface SubscribableChannel
public void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
java.lang.Exception
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void destroy() throws java.lang.Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
java.lang.Exception