|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter org.springframework.integration.jms.JmsDestinationPollingSource
public class JmsDestinationPollingSource
A source for receiving JMS Messages with a polling listener. This source is
only recommended for very low message volume. Otherwise, the
JmsMessageDrivenEndpoint
that uses Spring's MessageListener container
support is a better option.
Constructor Summary | |
---|---|
JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory,
javax.jms.Destination destination)
|
|
JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory,
java.lang.String destinationName)
|
|
JmsDestinationPollingSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
|
Method Summary | |
---|---|
protected void |
configureMessageConverter(org.springframework.jms.core.JmsTemplate jmsTemplate,
JmsHeaderMapper headerMapper)
|
Message<java.lang.Object> |
receive()
Retrieve the next available message from this source. |
void |
setExtractPayload(boolean extractPayload)
Specify whether the payload should be extracted from each received JMS Message to be used as the Spring Integration Message payload. |
void |
setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
Specify a MessageConverter to use when mapping from JMS Mesages to Spring Integration Messages. |
void |
setMessageSelector(java.lang.String messageSelector)
Specify a JMS Message Selector expression to use when receiving Messages. |
Methods inherited from class org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter |
---|
afterPropertiesSet, getJmsTemplate, setConnectionFactory, setDestination, setDestinationName, setDestinationResolver, setHeaderMapper, setJmsTemplate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmsDestinationPollingSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
public JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination)
public JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory, java.lang.String destinationName)
Method Detail |
---|
public void setMessageSelector(java.lang.String messageSelector)
public void setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
HeaderMappingMessageConverter
, it will be wrapped.
public void setExtractPayload(boolean extractPayload)
The default value is true
. To force creation of Spring
Integration Messages whose payload is the actual JMS Message, set this
to false
.
public Message<java.lang.Object> receive()
MessageSource
null
if no message is available.
receive
in interface MessageSource<java.lang.Object>
protected void configureMessageConverter(org.springframework.jms.core.JmsTemplate jmsTemplate, JmsHeaderMapper headerMapper)
configureMessageConverter
in class AbstractJmsTemplateBasedAdapter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |