org.springframework.integration.adapter.jms
Class JmsSource

java.lang.Object
  extended by org.springframework.integration.adapter.jms.AbstractJmsTemplateBasedAdapter
      extended by org.springframework.integration.adapter.jms.JmsSource
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, MessageSource<java.lang.Object>, PollableSource<java.lang.Object>

public class JmsSource
extends AbstractJmsTemplateBasedAdapter
implements PollableSource<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 JmsGateway that uses Spring's MessageListener container support is highly recommended.

Author:
Mark Fisher

Constructor Summary
JmsSource(javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination)
           
JmsSource(javax.jms.ConnectionFactory connectionFactory, java.lang.String destinationName)
           
JmsSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
           
 
Method Summary
 Message<java.lang.Object> receive()
          Retrieve a message from this source or null if no message is available.
 
Methods inherited from class org.springframework.integration.adapter.jms.AbstractJmsTemplateBasedAdapter
afterPropertiesSet, getJmsTemplate, setConnectionFactory, setDestination, setDestinationName, setHeaderMapper, setJmsTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsSource

public JmsSource(org.springframework.jms.core.JmsTemplate jmsTemplate)

JmsSource

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

JmsSource

public JmsSource(javax.jms.ConnectionFactory connectionFactory,
                 java.lang.String destinationName)
Method Detail

receive

public Message<java.lang.Object> receive()
Description copied from interface: PollableSource
Retrieve a message from this source or null if no message is available.

Specified by:
receive in interface PollableSource<java.lang.Object>