org.springframework.ws.transport.mail.monitor
Class ImapIdleMonitoringStrategy
java.lang.Object
org.springframework.ws.transport.mail.monitor.AbstractMonitoringStrategy
org.springframework.ws.transport.mail.monitor.ImapIdleMonitoringStrategy
- All Implemented Interfaces:
- MonitoringStrategy
public class ImapIdleMonitoringStrategy
- extends AbstractMonitoringStrategy
Implementation of the MonitoringStrategy
interface that uses the IMAP IDLE command for asynchronous message
detection.
Note that this implementation is only suitable for use with IMAP servers which support the IDLE command.
Additionally, this strategy requires JavaMail version 1.4.1.
- Since:
- 1.5.0
- Author:
- Arjen Poutsma
Method Summary |
protected void |
waitForNewMessages(Folder folder)
Template method that blocks until new messages arrive in the given folder. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImapIdleMonitoringStrategy
public ImapIdleMonitoringStrategy()
waitForNewMessages
protected void waitForNewMessages(Folder folder)
throws MessagingException,
InterruptedException
- Description copied from class:
AbstractMonitoringStrategy
- Template method that blocks until new messages arrive in the given folder. Typical implementations use
Thread.sleep(long)
or the IMAP IDLE command.
- Specified by:
waitForNewMessages
in class AbstractMonitoringStrategy
- Parameters:
folder
- the folder to monitor
- Throws:
MessagingException
- in case of JavaMail errors
InterruptedException
- when a thread is interrupted
Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.