Class JmsDestinationPollingSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<Object>
org.springframework.integration.jms.JmsDestinationPollingSource
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,MessageSource<Object>,IntegrationPattern,NamedComponent,IntegrationInboundManagement,IntegrationManagement
public class JmsDestinationPollingSource extends AbstractMessageSource<Object>
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.- Author:
- Mark Fisher, Oleg Zhurakousky, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME -
Constructor Summary
Constructors Constructor Description JmsDestinationPollingSource(JmsTemplate jmsTemplate) -
Method Summary
Modifier and Type Method Description protected ObjectdoReceive()Will receive a JMSMessageconverting and returning it as a Spring IntegrationMessage.StringgetComponentType()protected voidonInit()voidsetDestination(javax.jms.Destination destination)voidsetDestinationName(String destinationName)voidsetExtractPayload(boolean extractPayload)The flag to indicate if we should extractbodyfrom JMS Message, or use the received JMS Message asMessagepayload.voidsetHeaderMapper(JmsHeaderMapper headerMapper)voidsetMessageSelector(String messageSelector)Specify a JMS Message Selector expression to use when receiving Messages.voidsetSessionAcknowledgeMode(String sessionAcknowledgeMode)Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSource
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.core.MessageSource
getIntegrationPatternType
-
Constructor Details
-
Method Details
-
setDestination
public void setDestination(javax.jms.Destination destination) -
setDestinationName
-
setExtractPayload
public void setExtractPayload(boolean extractPayload)The flag to indicate if we should extractbodyfrom JMS Message, or use the received JMS Message asMessagepayload.- Parameters:
extractPayload- the boolean flag. Defaults totrue.- Since:
- 3.0.7
-
getComponentType
-
setMessageSelector
Specify a JMS Message Selector expression to use when receiving Messages.- Parameters:
messageSelector- The message selector.
-
setHeaderMapper
-
setSessionAcknowledgeMode
-
onInit
protected void onInit()- Overrides:
onInitin classAbstractExpressionEvaluator
-
doReceive
Will receive a JMSMessageconverting and returning it as a Spring IntegrationMessage. This method will also use the currentJmsHeaderMapperinstance to map JMS properties to the MessageHeaders.- Specified by:
doReceivein classAbstractMessageSource<Object>- Returns:
- The value returned.
-