org.springframework.integration.jms
Class JmsDestinationPollingSource

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by 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.InitializingBean, org.springframework.integration.context.NamedComponent, org.springframework.integration.core.MessageSource<java.lang.Object>

public class JmsDestinationPollingSource
extends org.springframework.integration.context.IntegrationObjectSupport
implements org.springframework.integration.core.MessageSource<java.lang.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.


Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
JmsDestinationPollingSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
           
 
Method Summary
 java.lang.String getComponentType()
           
 org.springframework.integration.Message<java.lang.Object> receive()
          Will receive a JMS Message converting and returning it as a Spring Integration Message.
 void setDestination(javax.jms.Destination destination)
           
 void setDestinationName(java.lang.String destinationName)
           
 void setHeaderMapper(JmsHeaderMapper headerMapper)
           
 void setMessageSelector(java.lang.String messageSelector)
          Specify a JMS Message Selector expression to use when receiving Messages.
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmsDestinationPollingSource

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

setDestination

public void setDestination(javax.jms.Destination destination)

setDestinationName

public void setDestinationName(java.lang.String destinationName)

getComponentType

public java.lang.String getComponentType()
Specified by:
getComponentType in interface org.springframework.integration.context.NamedComponent
Overrides:
getComponentType in class org.springframework.integration.context.IntegrationObjectSupport

setMessageSelector

public void setMessageSelector(java.lang.String messageSelector)
Specify a JMS Message Selector expression to use when receiving Messages.


setHeaderMapper

public void setHeaderMapper(JmsHeaderMapper headerMapper)

receive

public org.springframework.integration.Message<java.lang.Object> receive()
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:
receive in interface org.springframework.integration.core.MessageSource<java.lang.Object>