|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.handler.AbstractMessageHandler org.springframework.integration.handler.AbstractReplyProducingMessageHandler org.springframework.integration.jms.JmsOutboundGateway
public class JmsOutboundGateway
An outbound Messaging Gateway for request/reply JMS.
Field Summary |
---|
Fields inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
---|
DEFAULT_SEND_TIMEOUT |
Fields inherited from class org.springframework.integration.handler.AbstractMessageHandler |
---|
logger |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
JmsOutboundGateway()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected javax.jms.Connection |
createConnection()
Create a new JMS Connection for this JMS gateway, ideally a javax.jms.QueueConnection . |
protected javax.jms.Session |
createSession(javax.jms.Connection connection)
Create a new JMS Session for this JMS gateway, ideally a javax.jms.QueueSession . |
protected void |
handleRequestMessage(Message<?> message,
ReplyMessageHolder replyMessageHolder)
|
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Set the JMS ConnectionFactory that this gateway should use. |
void |
setDeliveryMode(int deliveryMode)
Specify the JMS DeliveryMode to use when sending request Messages. |
void |
setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
Provide the DestinationResolver to use when resolving either a
'requestDestinationName' or 'replyDestinationName' value. |
void |
setExtractReplyPayload(boolean extractReplyPayload)
This property will take effect if no custom MessageConverter
has been provided to the setMessageConverter(MessageConverter)
method. |
void |
setExtractRequestPayload(boolean extractRequestPayload)
This property will take effect if no custom MessageConverter
has been provided to the setMessageConverter(MessageConverter)
method. |
void |
setHeaderMapper(JmsHeaderMapper headerMapper)
Provide a JmsHeaderMapper implementation for mapping the
Spring Integration Message Headers to/from JMS Message properties. |
void |
setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
Provide a MessageConverter strategy to use for converting the
Spring Integration request Message into a JMS Message and for converting
the JMS reply Messages back into Spring Integration Messages. |
void |
setPriority(int priority)
Specify the JMS priority to use when sending request Messages. |
void |
setPubSubDomain(boolean pubSubDomain)
Specify whether the request destination is a Topic. |
void |
setReceiveTimeout(long receiveTimeout)
Set the max timeout value for the MessageConsumer's receive call when waiting for a reply. |
void |
setReplyChannel(MessageChannel replyChannel)
Specify the Spring Integration reply channel. |
void |
setReplyDestination(javax.jms.Destination replyDestination)
Set the JMS Destination from which reply Messages should be received. |
void |
setReplyDestinationName(java.lang.String replyDestinationName)
Set the name of the JMS Destination from which reply Messages should be received. |
void |
setRequestDestination(javax.jms.Destination requestDestination)
Set the JMS Destination to which request Messages should be sent. |
void |
setRequestDestinationName(java.lang.String requestDestinationName)
Set the name of the JMS Destination to which request Messages should be sent. |
void |
setTimeToLive(long timeToLive)
Specify the timeToLive for each sent Message. |
Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
---|
getOutputChannel, handleMessageInternal, sendReplyMessage, setBeanFactory, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout |
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler |
---|
getOrder, handleMessage, setOrder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmsOutboundGateway()
Method Detail |
---|
public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
public void setRequestDestination(javax.jms.Destination requestDestination)
public void setRequestDestinationName(java.lang.String requestDestinationName)
public void setReplyDestination(javax.jms.Destination replyDestination)
TemporaryQueue
per invocation.
public void setReplyDestinationName(java.lang.String replyDestinationName)
TemporaryQueue
per invocation.
public void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
DestinationResolver
to use when resolving either a
'requestDestinationName' or 'replyDestinationName' value. The default
is an instance of DynamicDestinationResolver
.
public void setPubSubDomain(boolean pubSubDomain)
pubSubDomain
- true if the request destination is a Topicpublic void setReceiveTimeout(long receiveTimeout)
public void setDeliveryMode(int deliveryMode)
public void setPriority(int priority)
public void setTimeToLive(long timeToLive)
public void setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
MessageConverter
strategy to use for converting the
Spring Integration request Message into a JMS Message and for converting
the JMS reply Messages back into Spring Integration Messages.
The default is a HeaderMappingMessageConverter
that delegates to
a SimpleMessageConverter
.
public void setHeaderMapper(JmsHeaderMapper headerMapper)
JmsHeaderMapper
implementation for mapping the
Spring Integration Message Headers to/from JMS Message properties.
This property will be ignored if a MessageConverter
is
provided to the setMessageConverter(MessageConverter)
method.
However, you may provide your own implementation of the delegating
HeaderMappingMessageConverter
implementation.
public void setExtractRequestPayload(boolean extractRequestPayload)
MessageConverter
has been provided to the setMessageConverter(MessageConverter)
method. In that case, a HeaderMappingMessageConverter
will be
used by default, and this value will be passed along to that converter's
'extractIntegrationMessagePayload' property.
HeaderMappingMessageConverter.setExtractIntegrationMessagePayload(boolean)
public void setExtractReplyPayload(boolean extractReplyPayload)
MessageConverter
has been provided to the setMessageConverter(MessageConverter)
method. In that case, a HeaderMappingMessageConverter
will be
used by default, and this value will be passed along to that converter's
'extractJmsMessageBody' property.
HeaderMappingMessageConverter.setExtractJmsMessageBody(boolean)
public void setReplyChannel(MessageChannel replyChannel)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected void handleRequestMessage(Message<?> message, ReplyMessageHolder replyMessageHolder)
handleRequestMessage
in class AbstractReplyProducingMessageHandler
protected javax.jms.Connection createConnection() throws javax.jms.JMSException
javax.jms.QueueConnection
.
The default implementation uses the
javax.jms.QueueConnectionFactory
API if available,
falling back to a standard JMS 1.1 ConnectionFactory otherwise.
This is necessary for working with generic JMS 1.1 connection pools
(such as ActiveMQ's org.apache.activemq.pool.PooledConnectionFactory
).
javax.jms.JMSException
protected javax.jms.Session createSession(javax.jms.Connection connection) throws javax.jms.JMSException
javax.jms.QueueSession
.
The default implementation uses the
javax.jms.QueueConnection
API if available,
falling back to a standard JMS 1.1 Connection otherwise.
This is necessary for working with generic JMS 1.1 connection pools
(such as ActiveMQ's org.apache.activemq.pool.PooledConnectionFactory
).
javax.jms.JMSException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |