public class PublishSubscribeAmqpChannel extends AbstractAmqpChannel implements org.springframework.amqp.rabbit.connection.ConnectionListener
AbstractMessageChannel.ChannelInterceptorListloggerINDEFINITE_TIMEOUT| Constructor and Description |
|---|
PublishSubscribeAmqpChannel(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 org.springframework.amqp.core.AmqpAdmin |
getAdmin() |
protected org.springframework.amqp.rabbit.connection.ConnectionFactory |
getConnectionFactory() |
protected String |
getExchangeName()
Subclasses may override this method to return an Exchange name.
|
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected String |
obtainQueueName(org.springframework.amqp.core.AmqpAdmin admin,
String channelName) |
void |
onClose(org.springframework.amqp.rabbit.connection.Connection connection) |
void |
onCreate(org.springframework.amqp.rabbit.connection.Connection connection) |
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(Runnable callback) |
boolean |
subscribe(MessageHandler handler) |
boolean |
unsubscribe(MessageHandler handler) |
doSend, getRoutingKeyaddInterceptor, addInterceptor, getChannelInterceptors, getComponentType, getFullChannelName, getInterceptors, removeInterceptor, removeInterceptor, send, send, setConversionService, setDatatypes, setInterceptors, setMessageConverter, setShouldTrackafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsend, sendgetComponentNamepublic PublishSubscribeAmqpChannel(String channelName, org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer container, org.springframework.amqp.core.AmqpTemplate amqpTemplate)
public void setExchange(org.springframework.amqp.core.FanoutExchange exchange)
exchange - The fanout exchange.protected String obtainQueueName(org.springframework.amqp.core.AmqpAdmin admin, String channelName)
protected AbstractDispatcher createDispatcher()
protected String getExchangeName()
AbstractAmqpChannelgetExchangeName in class AbstractAmqpChannelpublic void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic void onCreate(org.springframework.amqp.rabbit.connection.Connection connection)
onCreate in interface org.springframework.amqp.rabbit.connection.ConnectionListenerpublic void onClose(org.springframework.amqp.rabbit.connection.Connection connection)
onClose in interface org.springframework.amqp.rabbit.connection.ConnectionListenerpublic void setMaxSubscribers(int maxSubscribers)
AbstractDispatcher).maxSubscribers - The maximum number of subscribers allowed.protected org.springframework.amqp.core.AmqpAdmin getAdmin()
protected org.springframework.amqp.rabbit.connection.ConnectionFactory getConnectionFactory()
public boolean subscribe(MessageHandler handler)
subscribe in interface SubscribableChannelpublic boolean unsubscribe(MessageHandler handler)
unsubscribe in interface SubscribableChannelpublic void onInit()
throws Exception
IntegrationObjectSupportonInit in class AbstractMessageChannelException - Any exception.public boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecycle