toolbox.services.mail
Class MailServiceEnvironment

Package class diagram package MailServiceEnvironment
java.lang.Object
  extended by toolbox.services.mail.MailServiceEnvironment
All Implemented Interfaces:
ServiceEnvironment

public class MailServiceEnvironment
extends java.lang.Object
implements ServiceEnvironment

ServiceEnvironment implemenation to provide access to a toolbox.mail.MailManager implementation.


Constructor Summary
MailServiceEnvironment()
          Default constructor.
 
Method Summary
 void create(java.lang.String name, java.lang.String conf)
          Create and set the MailManager for this environment.
 void destroy()
          Destroy this environment by destroying the member MailManager.
 MailManager getMailManager()
          Return the member MailManager.
 java.lang.String getName()
          Return the name of this environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailServiceEnvironment

public MailServiceEnvironment()
Default constructor.

Method Detail

create

public void create(java.lang.String name,
                   java.lang.String conf)
            throws ServiceException
Create and set the MailManager for this environment.

Specified by:
create in interface ServiceEnvironment
Parameters:
name - The name of this environment.
conf - The location of this environment's configuration.
Throws:
ServiceException - if the environment cannot be initialised.

getName

public java.lang.String getName()
Return the name of this environment.

Specified by:
getName in interface ServiceEnvironment
Returns:
String containing the name of this environment.

getMailManager

public MailManager getMailManager()
Return the member MailManager.

Returns:
MailManger instance of this environment.

destroy

public void destroy()
             throws ServiceException
Destroy this environment by destroying the member MailManager.

Specified by:
destroy in interface ServiceEnvironment
Throws:
ServiceException - if this environment cannot be destroyed.