Spring Integration

org.springframework.integration.jms
Class PollableJmsChannel

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.channel.AbstractMessageChannel
          extended by org.springframework.integration.jms.AbstractJmsChannel
              extended by org.springframework.integration.jms.PollableJmsChannel
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent, PollableChannel, TrackableComponent, MessageChannel

public class PollableJmsChannel
extends AbstractJmsChannel
implements PollableChannel

Since:
2.0
Author:
Mark Fisher, Oleg Zhurakousky

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel
AbstractMessageChannel.ChannelInterceptorList
 
Field Summary
 
Fields inherited from class org.springframework.integration.channel.AbstractMessageChannel
logger
 
Constructor Summary
PollableJmsChannel(org.springframework.jms.core.JmsTemplate jmsTemplate)
           
 
Method Summary
 Message<?> receive()
          Receive a message from this channel, blocking indefinitely if necessary.
 Message<?> receive(long timeout)
          Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.
 
Methods inherited from class org.springframework.integration.jms.AbstractJmsChannel
doSend
 
Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel
addInterceptor, getComponentType, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.MessageChannel
send, send
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

PollableJmsChannel

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

receive

public Message<?> receive()
Description copied from interface: PollableChannel
Receive a message from this channel, blocking indefinitely if necessary.

Specified by:
receive in interface PollableChannel
Returns:
the next available Message or null if interrupted

receive

public Message<?> receive(long timeout)
Description copied from interface: PollableChannel
Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.

Specified by:
receive in interface PollableChannel
Parameters:
timeout - the timeout in milliseconds
Returns:
the next available Message or null if the specified timeout period elapses or the message reception is interrupted

Spring Integration