org.apache.james.transport
Class JamesSpoolManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.transport.JamesSpoolManager
All Implemented Interfaces:
java.lang.Runnable, 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

public class JamesSpoolManager
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, java.lang.Runnable, org.apache.avalon.framework.activity.Disposable

Manages the mail spool. This class is responsible for retrieving messages from the spool, directing messages to the appropriate processor, and removing them from the spool when processing is complete.

Version:
CVS $Revision: 494012 $ $Date: 2007-01-08 10:23:58 +0000 (Mon, 08 Jan 2007) $

Constructor Summary
JamesSpoolManager()
           
 
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.
 void initialize()
           
protected  void process(Mail mail)
          Process this mail message by the appropriate processor as designated in the state of the Mail object.
 void run()
          This routinely checks the message spool for messages, and processes them as necessary
 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
 

Constructor Detail

JamesSpoolManager

public JamesSpoolManager()
Method Detail

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()

run

public void run()
This routinely checks the message spool for messages, and processes them as necessary

Specified by:
run in interface java.lang.Runnable

process

protected void process(Mail mail)
Process this mail message by the appropriate processor as designated in the state of the Mail object.

Parameters:
mail - the mail message to be processed

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 LinearProcessors managed by this JamesSpoolManager

Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable
Throws:
java.lang.Exception - if an error is encountered during shutdown


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.