Spring Integration

org.springframework.integration.jms
Class JmsDestinationPollingSource

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter
          extended by org.springframework.integration.jms.JmsDestinationPollingSource
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, MessageSource<Object>, NamedComponent

public class JmsDestinationPollingSource
extends AbstractJmsTemplateBasedAdapter
implements MessageSource<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(javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination)
           
JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory, String destinationName)
           
JmsDestinationPollingSource(JmsTemplate jmsTemplate)
           
 
Method Summary
 String getComponentType()
          Subclasses may implement this method to provide component type information.
 Message<Object> receive()
          Will receive a JMS Message converting and returning it as a Spring Integration Message.
 void setMessageSelector(String messageSelector)
          Specify a JMS Message Selector expression to use when receiving Messages.
 
Methods inherited from class org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter
configureMessageConverter, getJmsTemplate, onInit, setConnectionFactory, setDeliveryMode, setDeliveryPersistent, setDestination, setDestinationName, setDestinationResolver, setExplicitQosEnabled, setExtractPayload, setHeaderMapper, setMessageConverter, setPriority, setPubSubDomain, setTimeToLive
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setTaskScheduler, toString, writeMessageHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmsDestinationPollingSource

public JmsDestinationPollingSource(JmsTemplate jmsTemplate)

JmsDestinationPollingSource

public JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory,
                                   javax.jms.Destination destination)

JmsDestinationPollingSource

public JmsDestinationPollingSource(javax.jms.ConnectionFactory connectionFactory,
                                   String destinationName)
Method Detail

getComponentType

public 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(String messageSelector)
Specify a JMS Message Selector expression to use when receiving Messages.


receive

public Message<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<Object>

Spring Integration

Copyright © 2010. All Rights Reserved.