org.apache.james.core
Class AbstractAvalonStore

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.core.AbstractAvalonStore
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
Direct Known Subclasses:
AvalonUsersStore, AvalonVirtualUserTableStore

public abstract class AbstractAvalonStore
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

Provides a registry of objects


Field Summary
protected  org.apache.avalon.framework.configuration.Configuration configuration
          The Avalon configuration used by the instance
protected  org.apache.avalon.framework.service.ServiceManager manager
          The Avalon component manager used by the instance
 
Constructor Summary
AbstractAvalonStore()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
abstract  java.lang.Object getClassInstance(java.lang.ClassLoader loader, java.lang.String className)
          Return new Object of the loader classname
abstract  org.apache.avalon.framework.configuration.Configuration[] getConfigurations(org.apache.avalon.framework.configuration.Configuration config)
          Return the Store configurations
protected  java.lang.Object getObject(java.lang.String name)
          Get the object, if any, whose name corresponds to the argument parameter
protected  java.util.Iterator getObjectNames()
          Yield an Iterator over the set of object names managed internally by this store.
abstract  java.lang.String getStoreName()
          Return the Store name which should be used for logging
 void initialize()
           
 void service(org.apache.avalon.framework.service.ServiceManager manager)
           
 
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
 

Field Detail

configuration

protected org.apache.avalon.framework.configuration.Configuration configuration
The Avalon configuration used by the instance


manager

protected org.apache.avalon.framework.service.ServiceManager manager
The Avalon component manager used by the instance

Constructor Detail

AbstractAvalonStore

public AbstractAvalonStore()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             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 configuration)
               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()

getObject

protected java.lang.Object getObject(java.lang.String name)
Get the object, if any, whose name corresponds to the argument parameter

Parameters:
name - the name of the desired object
Returns:
the Object corresponding to the name parameter

getObjectNames

protected java.util.Iterator getObjectNames()
Yield an Iterator over the set of object names managed internally by this store.

Returns:
an Iterator over the set of repository names for this store

getClassInstance

public abstract java.lang.Object getClassInstance(java.lang.ClassLoader loader,
                                                  java.lang.String className)
                                           throws java.lang.Exception
Return new Object of the loader classname

Parameters:
loader - the ClassLoader
className - the classname
Returns:
the loaded Objected
Throws:
java.lang.Exception

getConfigurations

public abstract org.apache.avalon.framework.configuration.Configuration[] getConfigurations(org.apache.avalon.framework.configuration.Configuration config)
Return the Store configurations

Parameters:
config - the main config
Returns:
configurations

getStoreName

public abstract java.lang.String getStoreName()
Return the Store name which should be used for logging

Returns:
the name


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