public class AmqpInboundGateway extends MessagingGatewaySupport
lifecycleCondition, lifecycleLock
logger
Constructor and Description |
---|
AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer) |
AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer,
AmqpTemplate amqpTemplate)
Construct
AmqpInboundGateway based on the provided AbstractMessageListenerContainer
to receive request messages and AmqpTemplate to send replies. |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setDefaultReplyTo(String defaultReplyTo)
The
defaultReplyTo address with the form
(exchange)/(routingKey) |
void |
setHeaderMapper(AmqpHeaderMapper headerMapper) |
void |
setMessageConverter(MessageConverter messageConverter)
Specify the
MessageConverter to convert request and reply to/from Message . |
getErrorChannel, getManagedName, getManagedType, getMessageCount, getMessageCountLong, getReplyChannel, getRequestChannel, isCountsEnabled, isLoggingEnabled, receive, reset, send, sendAndReceive, sendAndReceiveMessage, setCountsEnabled, setErrorChannel, setErrorChannelName, setLoggingEnabled, setManagedName, setManagedType, setReplyChannel, setReplyChannelName, setReplyMapper, setReplyTimeout, setRequestChannel, setRequestChannelName, setRequestMapper, setRequestTimeout, setShouldTrack
doStop, getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer)
public AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate)
AmqpInboundGateway
based on the provided AbstractMessageListenerContainer
to receive request messages and AmqpTemplate
to send replies.listenerContainer
- the AbstractMessageListenerContainer
to receive AMQP messages.amqpTemplate
- the AmqpTemplate
to send reply messages.public void setMessageConverter(MessageConverter messageConverter)
MessageConverter
to convert request and reply to/from Message
.
If the amqpTemplate
is explicitly set, this MessageConverter
isn't populated there. You must configure that external amqpTemplate
.messageConverter
- the MessageConverter
to use.public void setHeaderMapper(AmqpHeaderMapper headerMapper)
public void setDefaultReplyTo(String defaultReplyTo)
defaultReplyTo
address with the form
(exchange)/(routingKey)or
(queueName)if the request message doesn't have a
replyTo
property.
The second form uses the default exchange ("") and the queue name as
the routing key.defaultReplyTo
- the default replyTo
address to use.Address
public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class MessagingGatewaySupport
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class MessagingGatewaySupport
Exception
- Any exception.protected void doStart()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStart
in class MessagingGatewaySupport
protected void doStop()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStop
in class MessagingGatewaySupport