Class JmsDestinationPollingSource

java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<Object>
org.springframework.integration.jms.JmsDestinationPollingSource
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.integration.core.MessageSource<Object>, org.springframework.integration.IntegrationPattern, org.springframework.integration.support.context.NamedComponent, org.springframework.integration.support.management.IntegrationInboundManagement, org.springframework.integration.support.management.IntegrationManagement

public class JmsDestinationPollingSource extends org.springframework.integration.endpoint.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.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement

    org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides
  • Field Summary

    Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator

    EXPRESSION_PARSER, logger

    Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement

    METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmsDestinationPollingSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object
    Will receive a JMS Message converting and returning it as a Spring Integration Message.
     
    protected void
     
    void
    setDestination(jakarta.jms.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
     
    void
    setMessageSelector(String messageSelector)
    Specify a JMS Message Selector expression to use when receiving Messages.
    void
    setSessionAcknowledgeMode(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, setManagedType

    Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator

    afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement

    getThisAs, registerObservationRegistry

    Methods inherited from interface org.springframework.integration.core.MessageSource

    getIntegrationPatternType
  • Constructor Details

    • JmsDestinationPollingSource

      public JmsDestinationPollingSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
  • Method Details

    • setDestination

      public void setDestination(jakarta.jms.Destination destination)
    • setDestinationName

      public void setDestinationName(String destinationName)
    • setExtractPayload

      public 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.
      Parameters:
      extractPayload - the boolean flag. Defaults to true.
      Since:
      3.0.7
    • getComponentType

      public String getComponentType()
    • setMessageSelector

      public void setMessageSelector(String messageSelector)
      Specify a JMS Message Selector expression to use when receiving Messages.
      Parameters:
      messageSelector - The message selector.
    • setHeaderMapper

      public void setHeaderMapper(JmsHeaderMapper headerMapper)
    • setSessionAcknowledgeMode

      public void setSessionAcknowledgeMode(String sessionAcknowledgeMode)
    • onInit

      protected void onInit()
      Overrides:
      onInit in class org.springframework.integration.util.AbstractExpressionEvaluator
    • doReceive

      protected Object doReceive()
      Will receive a JMS 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.
      Specified by:
      doReceive in class org.springframework.integration.endpoint.AbstractMessageSource<Object>