com.atlassian.confluence.plugins.emailgateway.polling
Class FolderUtils

java.lang.Object
  extended by com.atlassian.confluence.plugins.emailgateway.polling.FolderUtils

public class FolderUtils
extends Object

Provides convenience methods for performing operations on JavaMail Folders.

Since:
v5.0

Nested Class Summary
static interface FolderUtils.FolderWorker<T>
           
 
Constructor Summary
FolderUtils()
           
 
Method Summary
static
<T> T
execute(FolderUtils.FolderWorker<T> worker)
          Performs arbitrary on a Folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderUtils

public FolderUtils()
Method Detail

execute

public static <T> T execute(FolderUtils.FolderWorker<T> worker)
                 throws javax.mail.MessagingException,
                        com.atlassian.mail.MailException
Performs arbitrary on a Folder. This handles the tedious business of opening and closing Folders, Sessions and Stores at the appropriate time.

Type Parameters:
T - The return type of the worker
Parameters:
worker - The callback providing the actual worker logic
Returns:
The results of the worker
Throws:
javax.mail.MessagingException
com.atlassian.mail.MailException


Copyright © 2003-2013 Atlassian. All Rights Reserved.