org.jwarp.service.mail
Class MailService

java.lang.Object
  |
  +--org.jwarp.service.AService
        |
        +--org.jwarp.service.mail.MailService
All Implemented Interfaces:
IConfigurable, IExceptionProvider, IMailService, IReferenceable, IService

public class MailService
extends AService
implements IMailService

Implementation of an SMTP mail service.

Version:
1.0
Author:
ORCA Systems, Martin Schäfer

Field Summary
protected  java.lang.String smtpHost
           
 
Fields inherited from class org.jwarp.service.AService
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket
 
Fields inherited from interface org.jwarp.service.mail.IMailService
SERVICE_TYPE
 
Fields inherited from interface org.jwarp.service.IService
SERVICE_STATUS_CREATED, SERVICE_STATUS_NOT_AVAILABLE, SERVICE_STATUS_READY, SERVICE_STATUS_RESUMING, SERVICE_STATUS_RUNNING, SERVICE_STATUS_STARTING, SERVICE_STATUS_STOPPED, SERVICE_STATUS_STOPPING, SERVICE_STATUS_SUSPENDED
 
Constructor Summary
MailService()
          Initializes the MailService.
 
Method Summary
 void configure(org.jdom.Element config)
          Sets the configuration for the MailService and initializes the service.
 Email prepareEmail()
           
 void send(Email email)
           
 
Methods inherited from class org.jwarp.service.AService
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName, shutdown, start, suspend
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwarp.service.IService
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend
 
Methods inherited from interface org.jwarp.common.IExceptionProvider
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener
 

Field Detail

smtpHost

protected java.lang.String smtpHost
Constructor Detail

MailService

public MailService()
            throws ServiceNotReadyException
Initializes the MailService. Excplicit private constructor.
Method Detail

configure

public void configure(org.jdom.Element config)
               throws ConfigurationException
Sets the configuration for the MailService and initializes the service.
Specified by:
configure in interface IConfigurable
Overrides:
configure in class AService
Following copied from interface: org.jwarp.service.configuration.IConfigurable
Parameters:
configuration - the class configurations.

prepareEmail

public Email prepareEmail()
                   throws javax.mail.MessagingException
Specified by:
prepareEmail in interface IMailService

send

public void send(Email email)
          throws javax.mail.MessagingException
Specified by:
send in interface IMailService

©   O R C A   S y s t e m s