org.abstracthorizon.mercury.common
Interface StorageManager

All Known Subinterfaces:
ConfigurableStorageManager
All Known Implementing Classes:
MaildirKeystoreStorageManager, SimpleJAASStorageManager, SimpleStorageManager

public interface StorageManager

Storage manager

Author:
Daniel Sendula

Method Summary
 javax.mail.Folder findInbox(String mailbox, String domain, char[] password)
          Returns local store's inbox if user is local or null otherwise.
 javax.mail.Store findStore(String mailbox, String domain, char[] password)
          Returns local store if user is local or null otherwise.
 String getMainDomain()
          Returns a domain this server's session is operating under.
 boolean hasDomain(String domain)
          Returns true in case supplied domain is local for this SMTP server.
 

Method Detail

findStore

javax.mail.Store findStore(String mailbox,
                           String domain,
                           char[] password)
                           throws UserRejectedException,
                                  javax.mail.MessagingException
Returns local store if user is local or null otherwise. In case that user is to be rejected an exception is thrown.

Parameters:
mailbox - user's mailbox
domain - user's domain
Throws:
UserRejectedException - in case that user is rejected for any reason
javax.mail.MessagingException - in case there is a problem accessing user's mailbox

findInbox

javax.mail.Folder findInbox(String mailbox,
                            String domain,
                            char[] password)
                            throws UserRejectedException,
                                   javax.mail.MessagingException
Returns local store's inbox if user is local or null otherwise. In case that user is to be rejected an exception is thrown.

Parameters:
mailbox - user's mailbox
domain - user's domain
Throws:
UserRejectedException - in case that user is rejected for any reason
javax.mail.MessagingException - in case there is a problem accessing user's mailbox

hasDomain

boolean hasDomain(String domain)
Returns true in case supplied domain is local for this SMTP server. If this method returns true then

Parameters:
domain - domain to be queried
Returns:
true in case supplied domain is local for this SMTP server

getMainDomain

String getMainDomain()
Returns a domain this server's session is operating under.

Returns:
domain name as string


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.