org.apache.hupa.server
Class InMemoryIMAPStoreCache

java.lang.Object
  extended by org.apache.hupa.server.InMemoryIMAPStoreCache
All Implemented Interfaces:
IMAPStoreCache
Direct Known Subclasses:
DemoGuiceServerModule.DemoIMAPStoreCache

public class InMemoryIMAPStoreCache
extends Object
implements IMAPStoreCache


Field Summary
protected  org.apache.commons.logging.Log logger
           
protected  javax.mail.Session session
           
 
Constructor Summary
InMemoryIMAPStoreCache(org.apache.commons.logging.Log logger, String address, int port, boolean useSSL, int connectionPoolSize, int timeout, boolean debug, String truststore, String truststorePassword, javax.mail.Session session)
           
 
Method Summary
 CachedIMAPStore createCachedIMAPStore()
           
 void delete(String username)
           
 void delete(User user)
           
 com.sun.mail.imap.IMAPStore get(String username, String password)
           
 com.sun.mail.imap.IMAPStore get(User user)
           
 javax.mail.Session getMailSession()
           
 javax.mail.Transport getMailTransport(boolean useSSL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected javax.mail.Session session

logger

protected org.apache.commons.logging.Log logger
Constructor Detail

InMemoryIMAPStoreCache

@Inject
public InMemoryIMAPStoreCache(org.apache.commons.logging.Log logger,
                                     String address,
                                     int port,
                                     boolean useSSL,
                                     int connectionPoolSize,
                                     int timeout,
                                     boolean debug,
                                     String truststore,
                                     String truststorePassword,
                                     javax.mail.Session session)
Method Detail

get

public com.sun.mail.imap.IMAPStore get(User user)
                                throws javax.mail.MessagingException
Specified by:
get in interface IMAPStoreCache
Throws:
javax.mail.MessagingException

get

public com.sun.mail.imap.IMAPStore get(String username,
                                       String password)
                                throws javax.mail.MessagingException
Specified by:
get in interface IMAPStoreCache
Throws:
javax.mail.MessagingException

createCachedIMAPStore

public CachedIMAPStore createCachedIMAPStore()
                                      throws javax.mail.NoSuchProviderException
Throws:
javax.mail.NoSuchProviderException

delete

public void delete(User user)
Specified by:
delete in interface IMAPStoreCache

delete

public void delete(String username)
Specified by:
delete in interface IMAPStoreCache

getMailTransport

public javax.mail.Transport getMailTransport(boolean useSSL)
                                      throws javax.mail.NoSuchProviderException
Specified by:
getMailTransport in interface IMAPStoreCache
Throws:
javax.mail.NoSuchProviderException

getMailSession

public javax.mail.Session getMailSession()
Specified by:
getMailSession in interface IMAPStoreCache


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.