org.springframework.integration.adapter.jms
Class JmsPollableSource

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

public class JmsPollableSource
extends java.lang.Object
implements PollableSource<java.lang.Object>, org.springframework.beans.factory.InitializingBean

A source for receiving JMS Messages with a polling listener. This source is only recommended for very low message volume. Otherwise, the JmsMessageDrivenSourceAdapter that uses Spring's MessageListener container support is highly recommended.

Author:
Mark Fisher

Constructor Summary
JmsPollableSource()
          No-arg constructor provided for convenience when configuring with setters.
JmsPollableSource(javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination)
           
JmsPollableSource(javax.jms.ConnectionFactory connectionFactory, java.lang.String destinationName)
           
JmsPollableSource(org.springframework.jms.core.JmsTemplate jmsTemplate)
           
 
Method Summary
 void afterPropertiesSet()
           
 java.util.Collection<java.lang.Object> poll(int limit)
           
 void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
           
 void setDestination(javax.jms.Destination destination)
           
 void setDestinationName(java.lang.String destinationName)
           
 void setJmsTemplate(org.springframework.jms.core.JmsTemplate jmsTemplate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsPollableSource

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

JmsPollableSource

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

JmsPollableSource

public JmsPollableSource(javax.jms.ConnectionFactory connectionFactory,
                         java.lang.String destinationName)

JmsPollableSource

public JmsPollableSource()
No-arg constructor provided for convenience when configuring with setters. Note that the initialization callback will validate.

Method Detail

setConnectionFactory

public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)

setDestination

public void setDestination(javax.jms.Destination destination)

setDestinationName

public void setDestinationName(java.lang.String destinationName)

setJmsTemplate

public void setJmsTemplate(org.springframework.jms.core.JmsTemplate jmsTemplate)

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

poll

public java.util.Collection<java.lang.Object> poll(int limit)
Specified by:
poll in interface PollableSource<java.lang.Object>