public class PointToPointSubscribableAmqpChannel extends AbstractAmqpChannel
AbstractMessageChannel.ChannelInterceptorList
IntegrationManagement.ManagementOverrides
interceptors
EXPRESSION_PARSER, logger
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
PointToPointSubscribableAmqpChannel(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.
|
PointToPointSubscribableAmqpChannel(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 AbstractDispatcher |
createDispatcher() |
void |
destroy() |
protected void |
doDeclares() |
int |
getPhase() |
protected java.lang.String |
getRoutingKey()
Subclasses may override this method to return a routing key.
|
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected java.lang.String |
obtainQueueName(java.lang.String channelName) |
void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the
channel's dispatcher (if it is an
AbstractDispatcher ). |
void |
setQueueName(java.lang.String queueName)
Provide a Queue name to be used.
|
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, getAdmin, getAmqpTemplate, getConnectionFactory, getExchangeName, getInboundHeaderMapper, getRabbitTemplate, isExtractPayload, isLoggingEnabled, onClose, onCreate, setAdmin, setConnectionFactory, setDefaultDeliveryMode, setExtractPayload, setHeadersMappedLast, setLoggingEnabled
addInterceptor, addInterceptor, configureMetrics, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isStatsEnabled, registerMetricsCaptor, removeInterceptor, removeInterceptor, reset, send, send, setCountsEnabled, setDatatypes, setInterceptors, setMessageConverter, setShouldTrack, setStatsEnabled
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onShutDown
getComponentName
public PointToPointSubscribableAmqpChannel(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 PointToPointSubscribableAmqpChannel(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 template.outboundMapper
- the outbound mapper.inboundMapper
- the inbound mapper.AbstractAmqpChannel.setExtractPayload(boolean)
public void setQueueName(java.lang.String queueName)
queueName
- The queue name.protected java.lang.String obtainQueueName(java.lang.String channelName)
protected AbstractDispatcher createDispatcher()
protected java.lang.String getRoutingKey()
AbstractAmqpChannel
getRoutingKey
in class AbstractAmqpChannel
protected void doDeclares()
doDeclares
in class AbstractAmqpChannel
public void setMaxSubscribers(int maxSubscribers)
AbstractDispatcher
).maxSubscribers
- The maximum number of subscribers allowed.public boolean subscribe(org.springframework.messaging.MessageHandler handler)
subscribe
in interface org.springframework.messaging.SubscribableChannel
public boolean unsubscribe(org.springframework.messaging.MessageHandler handler)
unsubscribe
in interface org.springframework.messaging.SubscribableChannel
public void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class AbstractAmqpChannel
java.lang.Exception
- Any exception.public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
getPhase
in interface org.springframework.context.SmartLifecycle
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
destroy
in class AbstractAmqpChannel
java.lang.Exception