toolbox.services.mail
Class MailService

Package class diagram package MailService
java.lang.Object
  extended by toolbox.services.BaseService
      extended by toolbox.services.mail.MailService
All Implemented Interfaces:
Service
Direct Known Subclasses:
SimpleMailServiceImpl

public class MailService
extends BaseService

Convenience service implementation that can be used to develop services that require interaction with an Internet Mail server.


Constructor Summary
protected MailService()
          Default constructor.
 
Method Summary
 void create(java.lang.String name, java.lang.String confHome, ServiceEnvironment env, XMLProperties xmlProps)
          Create the service by obtaining a reference to the MailManager instance of the given environment.
protected  MailManager getMailManager()
          Return the MailManager for this service.
protected  SMTPMailer getSMTPMailer()
          Return the SMTPMailer instance for this service.
 
Methods inherited from class toolbox.services.BaseService
destroy, getConfigHome, getName, getProperties, getProperty, getXMLProperties, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailService

protected MailService()
Default constructor.

Method Detail

create

public void create(java.lang.String name,
                   java.lang.String confHome,
                   ServiceEnvironment env,
                   XMLProperties xmlProps)
            throws ServiceException
Create the service by obtaining a reference to the MailManager instance of the given environment.

Specified by:
create in interface Service
Overrides:
create in class BaseService
Parameters:
name - The name of this service.
confHome - The path to the configuration home directory.
env - The service environment for this service.
xmlProps - XML configuration properties.
Throws:
ServiceException - if this service cannot be created.

getMailManager

protected MailManager getMailManager()
Return the MailManager for this service.

Returns:
MailManager instance.

getSMTPMailer

protected SMTPMailer getSMTPMailer()
Return the SMTPMailer instance for this service.

Returns:
SMTPMailer instance.