Spring Integration

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, NamedComponent, MessageSource<java.lang.Object>

public class JmsDestinationPollingSource
extends IntegrationObjectSupport
implements 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.

Author:
Mark Fisher, Oleg Zhurakousky

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()
          Subclasses may implement this method to provide component type information.
 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()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this method to provide component type information.

Specified by:
getComponentType in interface NamedComponent
Overrides:
getComponentType in class 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 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 MessageSource<java.lang.Object>

Spring Integration