public interface MonitoringStrategy
IDLE command.| Modifier and Type | Method and Description |
|---|---|
int |
getFolderOpenMode()
Returns the folder open mode to be used by this strategy.
|
Message[] |
monitor(Folder folder)
Monitors the given folder, and returns any new messages when they arrive.
|
Message[] monitor(Folder folder) throws MessagingException, InterruptedException
folder - the folder in which to look for new messagesMessagingException - in case of JavaMail errorsInterruptedException - if a thread is interruptedint getFolderOpenMode()
Folder.READ_ONLY or Folder.READ_WRITE.