public class PublishSubscribeAmqpChannel extends AbstractAmqpChannel implements org.springframework.amqp.rabbit.connection.ConnectionListener
interceptors| Constructor and Description |
|---|
PublishSubscribeAmqpChannel(java.lang.String channelName,
org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container,
org.springframework.amqp.core.AmqpTemplate amqpTemplate)
Construct an instance with the supplied name, container and template; default header
mappers will be used if the message is mapped.
|
PublishSubscribeAmqpChannel(java.lang.String channelName,
org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container,
org.springframework.amqp.core.AmqpTemplate amqpTemplate,
AmqpHeaderMapper outboundMapper,
AmqpHeaderMapper inboundMapper)
Construct an instance with the supplied name, container and template; default header
mappers will be used if the message is mapped.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.integration.dispatcher.AbstractDispatcher |
createDispatcher() |
void |
destroy() |
protected org.springframework.amqp.core.AmqpAdmin |
getAdmin() |
protected org.springframework.amqp.rabbit.connection.ConnectionFactory |
getConnectionFactory() |
protected java.lang.String |
getExchangeName()
Subclasses may override this method to return an Exchange name.
|
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected java.lang.String |
obtainQueueName(org.springframework.amqp.core.AmqpAdmin admin,
java.lang.String channelName) |
void |
onClose(org.springframework.amqp.rabbit.connection.Connection connection) |
void |
onCreate(org.springframework.amqp.rabbit.connection.Connection connection) |
void |
onInit() |
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(org.springframework.messaging.MessageHandler handler) |
boolean |
unsubscribe(org.springframework.messaging.MessageHandler handler) |
doSend, getAmqpTemplate, getInboundHeaderMapper, getRabbitTemplate, getRoutingKey, isExtractPayload, isLoggingEnabled, setDefaultDeliveryMode, setExtractPayload, setLoggingEnabledaddInterceptor, addInterceptor, configureMetrics, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isStatsEnabled, removeInterceptor, removeInterceptor, reset, send, send, setCountsEnabled, setDatatypes, setInterceptors, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic PublishSubscribeAmqpChannel(java.lang.String channelName,
org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container,
org.springframework.amqp.core.AmqpTemplate amqpTemplate)
channelName - the channel name.container - the container.amqpTemplate - the template.AbstractAmqpChannel.setExtractPayload(boolean)public PublishSubscribeAmqpChannel(java.lang.String channelName,
org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container,
org.springframework.amqp.core.AmqpTemplate amqpTemplate,
AmqpHeaderMapper outboundMapper,
AmqpHeaderMapper inboundMapper)
channelName - the channel name.container - the container.amqpTemplate - the templateoutboundMapper - the outbound mapper.inboundMapper - the inbound mapper.AbstractAmqpChannel.setExtractPayload(boolean)public void setExchange(org.springframework.amqp.core.FanoutExchange exchange)
exchange - The fanout exchange.protected java.lang.String obtainQueueName(org.springframework.amqp.core.AmqpAdmin admin,
java.lang.String channelName)
protected org.springframework.integration.dispatcher.AbstractDispatcher createDispatcher()
protected java.lang.String getExchangeName()
AbstractAmqpChannelgetExchangeName in class AbstractAmqpChannelpublic void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic void start()
start in interface org.springframework.context.Lifecyclepublic 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(org.springframework.messaging.MessageHandler handler)
subscribe in interface org.springframework.messaging.SubscribableChannelpublic boolean unsubscribe(org.springframework.messaging.MessageHandler handler)
unsubscribe in interface org.springframework.messaging.SubscribableChannelpublic void onInit()
throws java.lang.Exception
onInit in class org.springframework.integration.channel.AbstractMessageChanneljava.lang.Exceptionpublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecycle