|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.mail.MailReceivingMessageSource
public class MailReceivingMessageSource
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 Summary | |
---|---|
MailReceivingMessageSource(MailReceiver mailReceiver)
|
Method Summary | |
---|---|
void |
afterCommit(MailReceiver.MailReceiverContext context)
Invoked via TransactionSynchronization when the
transaction commits. |
void |
afterReceiveNoTx(MailReceiver.MailReceiverContext resource)
For backwards-compatibility; the mail adapter updates the status before the send. |
void |
afterRollback(MailReceiver.MailReceiverContext context)
Invoked via TransactionSynchronization when the
transaction rolls back. |
void |
afterSendNoTx(MailReceiver.MailReceiverContext resource)
For backwards-compatibility; the mail adapter updates the status before the send. |
MailReceiver.MailReceiverContext |
getResource()
Obtain the resource on which appropriate action needs to be taken. |
Message<javax.mail.Message> |
receive()
Retrieve the next available message from this source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MailReceivingMessageSource(MailReceiver mailReceiver)
Method Detail |
---|
public Message<javax.mail.Message> receive()
MessageSource
null
if no message is available.
receive
in interface MessageSource<javax.mail.Message>
public MailReceiver.MailReceiverContext getResource()
PseudoTransactionalMessageSource
getResource
in interface PseudoTransactionalMessageSource<javax.mail.Message,MailReceiver.MailReceiverContext>
public void afterCommit(MailReceiver.MailReceiverContext context)
PseudoTransactionalMessageSource
TransactionSynchronization
when the
transaction commits.
afterCommit
in interface PseudoTransactionalMessageSource<javax.mail.Message,MailReceiver.MailReceiverContext>
context
- The resource to be "committed"public void afterRollback(MailReceiver.MailReceiverContext context)
PseudoTransactionalMessageSource
TransactionSynchronization
when the
transaction rolls back.
afterRollback
in interface PseudoTransactionalMessageSource<javax.mail.Message,MailReceiver.MailReceiverContext>
public void afterReceiveNoTx(MailReceiver.MailReceiverContext resource)
afterReceiveNoTx
in interface PseudoTransactionalMessageSource<javax.mail.Message,MailReceiver.MailReceiverContext>
public void afterSendNoTx(MailReceiver.MailReceiverContext resource)
afterSendNoTx
in interface PseudoTransactionalMessageSource<javax.mail.Message,MailReceiver.MailReceiverContext>
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |