|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.context.IntegrationObjectSupport
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.
| Nested Class Summary | |
|---|---|
static class |
JmsOutboundGateway.ReplyContainerProperties
|
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
logger |
| Fields inherited from interface org.springframework.core.Ordered |
|---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Constructor Summary | |
|---|---|
JmsOutboundGateway()
|
|
| Method Summary | |
|---|---|
protected javax.jms.Connection |
createConnection()
Create a new JMS Connection for this JMS gateway. |
protected javax.jms.Session |
createSession(javax.jms.Connection connection)
Create a new JMS Session using the provided Connection. |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information. |
int |
getPhase()
|
protected java.lang.Object |
handleRequestMessage(Message<?> message)
Subclasses must implement this method to handle the request Message. |
boolean |
isAutoStartup()
|
boolean |
isRunning()
|
void |
onInit()
Subclasses may implement this for initialization logic. |
void |
onMessage(javax.jms.Message message)
|
void |
setAutoStartup(boolean autoStartup)
|
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Set the JMS ConnectionFactory that this gateway should use. |
void |
setCorrelationKey(java.lang.String correlationKey)
Provide the name of a JMS property that should hold a generated UUID that the receiver of the JMS Message would expect to represent the CorrelationID. |
void |
setDeliveryMode(int deliveryMode)
Specify the JMS DeliveryMode to use when sending request Messages. |
void |
setDeliveryPersistent(boolean deliveryPersistent)
Set whether message delivery should be persistent or non-persistent, specified as a boolean value ("true" or "false"). |
void |
setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
Provide the DestinationResolver to use when resolving either a
'requestDestinationName' or 'replyDestinationName' value. |
void |
setExplicitQosEnabled(boolean explicitQosEnabled)
Specify whether explicit QoS settings are enabled (deliveryMode, priority, and timeToLive). |
void |
setExtractReplyPayload(boolean extractReplyPayload)
This property describes what to do with a JMS reply Message. |
void |
setExtractRequestPayload(boolean extractRequestPayload)
This property describes how a JMS Message should be generated from the Spring Integration Message. |
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 |
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 |
setReplyContainerProperties(JmsOutboundGateway.ReplyContainerProperties replyContainerProperties)
|
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 |
setReplyPubSubDomain(boolean replyPubSubDomain)
Specify whether the reply destination is a Topic. |
void |
setRequestDestination(javax.jms.Destination requestDestination)
Set the JMS Destination to which request Messages should be sent. |
void |
setRequestDestinationExpression(org.springframework.expression.Expression requestDestinationExpression)
Set the SpEL Expression to be used for determining the request Destination instance or request destination name. |
void |
setRequestDestinationName(java.lang.String requestDestinationName)
Set the name of the JMS Destination to which request Messages should be sent. |
void |
setRequestPubSubDomain(boolean requestPubSubDomain)
Specify whether the request destination is a Topic. |
void |
setTimeToLive(long timeToLive)
Specify the timeToLive for each sent Message. |
void |
setUseReplyContainer(boolean useReplyContainer)
|
void |
start()
|
void |
stop()
|
void |
stop(java.lang.Runnable callback)
|
| Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
|---|
getMessagingTemplate, handleMessageInternal, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders |
| Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler |
|---|
getOrder, handleMessage, setOrder, setShouldTrack |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.springframework.integration.context.NamedComponent |
|---|
getComponentName |
| Constructor Detail |
|---|
public JmsOutboundGateway()
| Method Detail |
|---|
public void setDeliveryPersistent(boolean deliveryPersistent)
The default is "true", i.e. delivery mode "PERSISTENT".
setDeliveryMode(int),
DeliveryMode.PERSISTENT,
DeliveryMode.NON_PERSISTENTpublic void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
public void setRequestDestination(javax.jms.Destination requestDestination)
public void setRequestDestinationName(java.lang.String requestDestinationName)
public void setRequestDestinationExpression(org.springframework.expression.Expression requestDestinationExpression)
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 setRequestPubSubDomain(boolean requestPubSubDomain)
requestPubSubDomain - true if the request destination is a Topicpublic void setReplyPubSubDomain(boolean replyPubSubDomain)
replyPubSubDomain - true if the reply 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 setExplicitQosEnabled(boolean explicitQosEnabled)
public void setCorrelationKey(java.lang.String correlationKey)
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 SimpleMessageConverter.
public void setHeaderMapper(JmsHeaderMapper headerMapper)
JmsHeaderMapper implementation for mapping the
Spring Integration Message Headers to/from JMS Message properties.
public void setExtractRequestPayload(boolean extractRequestPayload)
MessageConverter:
the entire Spring Integration Message or only its payload.
extractRequestPayload - public void setExtractReplyPayload(boolean extractReplyPayload)
extractReplyPayload - public void setReplyChannel(MessageChannel replyChannel)
public void setReplyContainerProperties(JmsOutboundGateway.ReplyContainerProperties replyContainerProperties)
replyContainerProperties - the replyContainerproperties to setpublic java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerpublic void setUseReplyContainer(boolean useReplyContainer)
useReplyContainer - the useReplyContainer to setpublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
public final void onInit()
IntegrationObjectSupport
onInit in class AbstractReplyProducingMessageHandlerpublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecycleprotected java.lang.Object handleRequestMessage(Message<?> message)
AbstractReplyProducingMessageHandler
handleRequestMessage in class AbstractReplyProducingMessageHandler
protected javax.jms.Connection createConnection()
throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.Session createSession(javax.jms.Connection connection)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void onMessage(javax.jms.Message message)
onMessage in interface javax.jms.MessageListener
|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||