public class MailReceivingMessageSource extends Object implements MessageSource<Message>, BeanFactoryAware
MessageSource
implementation that delegates to a
MailReceiver
to poll a mailbox. Each poll of the mailbox may
return more than one message which will then be stored in a queue.Constructor and Description |
---|
MailReceivingMessageSource(MailReceiver mailReceiver) |
Modifier and Type | Method and Description |
---|---|
protected BeanFactory |
getBeanFactory() |
protected MessageBuilderFactory |
getMessageBuilderFactory() |
Message<Message> |
receive()
Retrieve the next available message from this source.
|
void |
setBeanFactory(BeanFactory beanFactory) |
public MailReceivingMessageSource(MailReceiver mailReceiver)
public final void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
protected BeanFactory getBeanFactory()
protected MessageBuilderFactory getMessageBuilderFactory()
public Message<Message> receive()
MessageSource
null
if no message is available.receive
in interface MessageSource<Message>