org.apache.james.transport
Class JamesMailetLoader

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.transport.Loader
          extended by org.apache.james.transport.JamesMailetLoader
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, MailetLoader

public class JamesMailetLoader
extends Loader
implements MailetLoader

Loads Mailets for use inside James.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.james.transport.Loader
Loader.MailetContextWrapper
 
Field Summary
 
Fields inherited from class org.apache.james.transport.Loader
baseDirectory, MAILET_PACKAGE, mailetContext, MATCHER_PACKAGE, packages
 
Fields inherited from interface org.apache.james.transport.MailetLoader
ROLE
 
Constructor Summary
JamesMailetLoader()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
 org.apache.mailet.Mailet getMailet(java.lang.String mailetName, org.apache.avalon.framework.configuration.Configuration configuration)
          Get a new Mailet with the specified name acting in the specified context.
 ServiceLocator getServiceLocator()
          Gets the service locator.
 void setServiceLocator(ServiceLocator serviceLocator)
          Sets the service locator.
 
Methods inherited from class org.apache.james.transport.Loader
getPackages, initialize, service, setMailetContext
 
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

JamesMailetLoader

public JamesMailetLoader()
Method Detail

getServiceLocator

public final ServiceLocator getServiceLocator()
Gets the service locator.

Returns:
the serviceLocator, not null after initialisation

setServiceLocator

public final void setServiceLocator(ServiceLocator serviceLocator)
Sets the service locator.

Parameters:
serviceLocator - the serviceLocator to set

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
Specified by:
configure in class Loader
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(Configuration)

getMailet

public org.apache.mailet.Mailet getMailet(java.lang.String mailetName,
                                          org.apache.avalon.framework.configuration.Configuration configuration)
                                   throws javax.mail.MessagingException
Description copied from interface: MailetLoader
Get a new Mailet with the specified name acting in the specified context.

Specified by:
getMailet in interface MailetLoader
Parameters:
mailetName - the name of the mailet to be loaded
configuration - the Configuration to be passed to the new mailet
Throws:
javax.mail.MessagingException - if an error occurs
See Also:
MailetLoader.getMailet(java.lang.String, org.apache.avalon.framework.configuration.Configuration)


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