org.apache.james.transport
Class StateAwareProcessorList
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.transport.StateAwareProcessorList
- All Implemented Interfaces:
- org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, MailProcessor, ProcessorList
public class StateAwareProcessorList
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable, MailProcessor, ProcessorList
This class is responsible for creating a set of named processors and
directing messages to the appropriate processor (given the State of the mail)
- Version:
- CVS $Revision: 405882 $ $Date: 2006-05-12 23:30:04 +0200 (ven, 12 mag 2006) $
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
dispose()
The dispose operation is called at the end of a components lifecycle. |
MailProcessor |
getProcessor(java.lang.String name)
|
java.lang.String[] |
getProcessorNames()
|
void |
initialize()
|
void |
service(org.apache.mailet.Mail mail)
Process this mail message by the appropriate processor as designated
in the state of the Mail object. |
void |
service(org.apache.avalon.framework.service.ServiceManager comp)
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StateAwareProcessorList
public StateAwareProcessorList()
service
public void service(org.apache.avalon.framework.service.ServiceManager comp)
throws org.apache.avalon.framework.service.ServiceException
- Specified by:
service
in interface org.apache.avalon.framework.service.Serviceable
- Throws:
org.apache.avalon.framework.service.ServiceException
- See Also:
Serviceable.service(ServiceManager)
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- See Also:
Configurable.configure(Configuration)
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Throws:
java.lang.Exception
- See Also:
Initializable.initialize()
service
public void service(org.apache.mailet.Mail mail)
- Process this mail message by the appropriate processor as designated
in the state of the Mail object.
- Specified by:
service
in interface MailProcessor
- Parameters:
mail
- the mail message to be processed- See Also:
MailProcessor.service(org.apache.mailet.Mail)
dispose
public void dispose()
- The dispose operation is called at the end of a components lifecycle.
Instances of this class use this method to release and destroy any
resources that they own.
This implementation shuts down the Processors managed by this
Component
- Specified by:
dispose
in interface org.apache.avalon.framework.activity.Disposable
- See Also:
Disposable.dispose()
getProcessorNames
public java.lang.String[] getProcessorNames()
- Specified by:
getProcessorNames
in interface ProcessorList
- Returns:
- names of all configured processors
getProcessor
public MailProcessor getProcessor(java.lang.String name)
- Specified by:
getProcessor
in interface ProcessorList
- Returns:
- access the child processor
Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.