toolbox.mail
Class SessionManagerMailConfigImpl

Package class diagram package SessionManagerMailConfigImpl
java.lang.Object
  extended by toolbox.mail.SessionManagerMailConfigImpl
All Implemented Interfaces:
SessionManager

public class SessionManagerMailConfigImpl
extends java.lang.Object
implements SessionManager

SessionManager implementation that utilises the toolbox.allegato.MailConfig class to obtain a reference to javax.mail.Session instance.


Constructor Summary
SessionManagerMailConfigImpl()
          Default constructor
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionManagerMailConfigImpl

public SessionManagerMailConfigImpl()
Default constructor

Method Detail

init

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

Specified by:
init in interface SessionManager
Parameters:
xmlProps - XML configuration properties.
Throws:
MailException - if the SessionManager cannot be initialised.

getSession

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

Specified by:
getSession in interface SessionManager
Returns:
Session instance.
Throws:
MailException - if a Session cannot be returned.

destroy

public void destroy()
             throws MailException
Destroy this manager.

Specified by:
destroy in interface SessionManager
Throws:
MailException - if the manager cannot be destroyed.