public class ChannelPublishingJmsMessageListener
extends java.lang.Object
implements org.springframework.jms.listener.SessionAwareMessageListener<javax.jms.Message>, org.springframework.beans.factory.InitializingBean, org.springframework.integration.support.management.TrackableComponent, org.springframework.beans.factory.BeanFactoryAware
true, it will also wait for a Spring Integration reply Message
and convert that into a JMS reply.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
ChannelPublishingJmsMessageListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
java.lang.String |
getComponentName() |
java.lang.String |
getComponentType() |
void |
onMessage(javax.jms.Message jmsMessage,
javax.jms.Session session) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setComponentName(java.lang.String componentName) |
void |
setCorrelationKey(java.lang.String correlationKey)
Provide the name of a JMS property that should be copied from the request
Message to the reply Message.
|
void |
setDefaultReplyDestination(javax.jms.Destination defaultReplyDestination)
Set the default reply destination to send reply messages to.
|
void |
setDefaultReplyQueueName(java.lang.String destinationName)
Set the name of the default reply queue to send reply messages to.
|
void |
setDefaultReplyTopicName(java.lang.String destinationName)
Set the name of the default reply topic to send reply messages to.
|
void |
setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
Set the DestinationResolver that should be used to resolve reply
destination names for this listener.
|
void |
setErrorChannel(org.springframework.messaging.MessageChannel errorChannel) |
void |
setErrorChannelName(java.lang.String errorChannelName) |
void |
setExpectReply(boolean expectReply)
Specify whether a JMS reply Message is expected.
|
void |
setExplicitQosEnabledForReplies(boolean explicitQosEnabledForReplies)
Specify whether explicit QoS should be enabled for replies
(for timeToLive, priority, and deliveryMode settings).
|
void |
setExtractReplyPayload(boolean extractReplyPayload)
Specify whether the Spring Integration reply Message's payload should be
extracted prior to converting into a JMS Message.
|
void |
setExtractRequestPayload(boolean extractRequestPayload)
Specify whether the JMS request Message's body should be extracted prior
to converting into a Spring Integration Message.
|
void |
setHeaderMapper(JmsHeaderMapper headerMapper)
Provide a
JmsHeaderMapper implementation to use when
converting between JMS Messages and Spring Integration Messages. |
void |
setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
Provide a
MessageConverter implementation to use when
converting between JMS Messages and Spring Integration Messages. |
void |
setReplyChannel(org.springframework.messaging.MessageChannel replyChannel) |
void |
setReplyChannelName(java.lang.String replyChannelName) |
void |
setReplyDeliveryPersistent(boolean replyDeliveryPersistent)
Specify the delivery mode for JMS reply Messages.
|
void |
setReplyPriority(int replyPriority)
Specify the priority value for JMS reply Messages.
|
void |
setReplyTimeout(long replyTimeout) |
void |
setReplyTimeToLive(long replyTimeToLive)
Specify the time-to-live property for JMS reply Messages.
|
void |
setRequestChannel(org.springframework.messaging.MessageChannel requestChannel) |
void |
setRequestChannelName(java.lang.String requestChannelName) |
void |
setRequestTimeout(long requestTimeout) |
void |
setShouldTrack(boolean shouldTrack) |
protected void |
start() |
protected void |
stop() |
public void setExpectReply(boolean expectReply)
expectReply - true if a reply is expected.public void setComponentName(java.lang.String componentName)
public void setRequestChannel(org.springframework.messaging.MessageChannel requestChannel)
public void setRequestChannelName(java.lang.String requestChannelName)
public void setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)
public void setReplyChannelName(java.lang.String replyChannelName)
public void setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)
public void setErrorChannelName(java.lang.String errorChannelName)
public void setRequestTimeout(long requestTimeout)
public void setReplyTimeout(long replyTimeout)
public void setShouldTrack(boolean shouldTrack)
setShouldTrack in interface org.springframework.integration.support.management.TrackableComponentpublic java.lang.String getComponentName()
getComponentName in interface org.springframework.integration.support.context.NamedComponentpublic java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentpublic void setDefaultReplyDestination(javax.jms.Destination defaultReplyDestination)
defaultReplyDestination - The default reply destination.public void setDefaultReplyQueueName(java.lang.String destinationName)
Alternatively, specify a JMS Destination object as "defaultReplyDestination".
destinationName - The default reply destination name.setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver),
setDefaultReplyDestination(javax.jms.Destination)public void setDefaultReplyTopicName(java.lang.String destinationName)
Alternatively, specify a JMS Destination object as "defaultReplyDestination".
destinationName - The default reply topic name.setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver),
setDefaultReplyDestination(javax.jms.Destination)public void setReplyTimeToLive(long replyTimeToLive)
replyTimeToLive - The reply time to live.MessageProducer.setTimeToLive(long)public void setReplyPriority(int replyPriority)
replyPriority - The reply priority.MessageProducer.setPriority(int)public void setReplyDeliveryPersistent(boolean replyDeliveryPersistent)
replyDeliveryPersistent - true for a persistent reply message.MessageProducer.setDeliveryMode(int)public void setCorrelationKey(java.lang.String correlationKey)
correlationKey - The correlation key.public void setExplicitQosEnabledForReplies(boolean explicitQosEnabledForReplies)
explicitQosEnabledForReplies - true to enable explicit QoS.public void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
The default resolver is a DynamicDestinationResolver. Specify a JndiDestinationResolver for resolving destination names as JNDI locations.
destinationResolver - The destination resolver.DynamicDestinationResolver,
JndiDestinationResolverpublic void setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
MessageConverter implementation to use when
converting between JMS Messages and Spring Integration Messages.
If none is provided, a SimpleMessageConverter will
be used.messageConverter - The message converter.public void setHeaderMapper(JmsHeaderMapper headerMapper)
JmsHeaderMapper implementation to use when
converting between JMS Messages and Spring Integration Messages.
If none is provided, a DefaultJmsHeaderMapper will be used.headerMapper - The header mapper.public void setExtractRequestPayload(boolean extractRequestPayload)
true by default. To send the JMS Message itself as a
Spring Integration Message payload, set this to false.extractRequestPayload - true if the request payload should be extracted.public void setExtractReplyPayload(boolean extractReplyPayload)
true by default. To send the Spring Integration Message
itself as the JMS Message's body, set this to false.extractReplyPayload - true if the reply payload should be extracted.public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic void onMessage(javax.jms.Message jmsMessage,
javax.jms.Session session)
throws javax.jms.JMSException
onMessage in interface org.springframework.jms.listener.SessionAwareMessageListener<javax.jms.Message>javax.jms.JMSExceptionpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprotected void start()
protected void stop()