toolbox.mail
Interface SessionManager

Package class diagram package SessionManager
All Known Implementing Classes:
SessionManagerJEEImpl, SessionManagerMailConfigImpl

public interface SessionManager

Interface defining a mechanism to abstract the implementation details of obtaining a JavaMail Session.


Method Summary
 void destroy()
          Destroy this manager.
 javax.mail.Session getSession()
          Return a JavaMail Session instance.
 void init(XMLProperties xmlProps)
          Initialise this SessionManager with the given XML configuration properties.
 

Method Detail

init

void init(XMLProperties xmlProps)
          throws MailException
Initialise this SessionManager with the given XML configuration properties.

Parameters:
xmlProps - XML configuration properties.
Throws:
MailException - if the SessionManager cannot be initialised.

getSession

javax.mail.Session getSession()
                              throws MailException
Return a JavaMail Session instance.

Returns:
Session instance.
Throws:
MailException - if a Session cannot be returned.

destroy

void destroy()
             throws MailException
Destroy this manager.

Throws:
MailException - if the manager cannot be destroyed.