public class JmsDestinationPollingSource extends AbstractMessageSource<Object>
JmsMessageDrivenEndpoint
that uses Spring's MessageListener container
support is a better option.IntegrationManagement.ManagementOverrides
EXPRESSION_PARSER, logger
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
JmsDestinationPollingSource(JmsTemplate jmsTemplate) |
Modifier and Type | Method and Description |
---|---|
protected Object |
doReceive()
|
String |
getComponentType() |
protected void |
onInit() |
void |
setDestination(Destination destination) |
void |
setDestinationName(String destinationName) |
void |
setExtractPayload(boolean extractPayload)
The flag to indicate if we should extract
body from JMS Message,
or use the received JMS Message as Message payload . |
void |
setHeaderMapper(JmsHeaderMapper headerMapper) |
void |
setMessageSelector(String messageSelector)
Specify a JMS Message Selector expression to use when receiving Messages.
|
void |
setSessionAcknowledgeMode(String sessionAcknowledgeMode) |
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedType
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIntegrationPatternType
getThisAs
public JmsDestinationPollingSource(JmsTemplate jmsTemplate)
public void setDestination(Destination destination)
public void setDestinationName(String destinationName)
public void setExtractPayload(boolean extractPayload)
body
from JMS Message,
or use the received JMS Message as Message
payload
.extractPayload
- the boolean flag. Defaults to true
.public String getComponentType()
public void setMessageSelector(String messageSelector)
messageSelector
- The message selector.public void setHeaderMapper(JmsHeaderMapper headerMapper)
public void setSessionAcknowledgeMode(String sessionAcknowledgeMode)
protected void onInit()
onInit
in class AbstractExpressionEvaluator
protected Object doReceive()
Message
converting and returning it as
a Spring Integration Message
. This method will also use the current
JmsHeaderMapper
instance to map JMS properties to the MessageHeaders.doReceive
in class AbstractMessageSource<Object>