public abstract class AbstractPollableChannel extends AbstractMessageChannel implements org.springframework.messaging.PollableChannel
AbstractMessageChannel.ChannelInterceptorList
logger
Constructor and Description |
---|
AbstractPollableChannel() |
Modifier and Type | Method and Description |
---|---|
protected abstract org.springframework.messaging.Message<?> |
doReceive(long timeout)
Subclasses must implement this method.
|
org.springframework.messaging.Message<?> |
receive()
Receive the first available message from this channel.
|
org.springframework.messaging.Message<?> |
receive(long timeout)
Receive the first available message from this channel.
|
addInterceptor, addInterceptor, doSend, getChannelInterceptors, getComponentType, getFullChannelName, getInterceptors, onInit, removeInterceptor, removeInterceptor, send, send, setConversionService, setDatatypes, setInterceptors, setMessageConverter, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public final org.springframework.messaging.Message<?> receive()
receive
in interface org.springframework.messaging.PollableChannel
null
if the
receiving thread is interrupted.public final org.springframework.messaging.Message<?> receive(long timeout)
receive()
).receive
in interface org.springframework.messaging.PollableChannel
timeout
- the timeout in millisecondsnull
if no message
is available within the allotted time or the receiving thread is
interrupted.protected abstract org.springframework.messaging.Message<?> doReceive(long timeout)
timeout
- The timeout.