org.codehaus.plexus
Class DefaultPlexusContainer
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.plexus.DefaultPlexusContainer
- All Implemented Interfaces:
- LogEnabled, PlexusContainer
- public class DefaultPlexusContainer
- extends AbstractLogEnabled
- implements PlexusContainer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
loggerManager
private LoggerManager loggerManager
context
private DefaultContext context
componentRepository
private ComponentRepository componentRepository
configuration
private PlexusConfiguration configuration
defaultConfiguration
private PlexusConfiguration defaultConfiguration
mergedConfiguration
private PlexusConfiguration mergedConfiguration
configurationReader
private java.io.Reader configurationReader
classWorld
private org.codehaus.classworlds.ClassWorld classWorld
classLoader
private java.lang.ClassLoader classLoader
resourceManager
private DefaultResourceManager resourceManager
builder
private XmlPullConfigurationBuilder builder
LOGGING_TAG
public static final java.lang.String LOGGING_TAG
- See Also:
- Constant Field Values
componentConfigurator
private ComponentConfigurator componentConfigurator
componentComposer
private ComponentComposer componentComposer
componentManagerManager
private ComponentManagerManager componentManagerManager
componentManagers
private java.util.Map componentManagers
componentManagersByComponentClass
private java.util.Map componentManagersByComponentClass
lifecycleHandlerManager
private LifecycleHandlerManager lifecycleHandlerManager
DefaultPlexusContainer
public DefaultPlexusContainer()
lookup
public java.lang.Object lookup(java.lang.String componentKey)
throws ComponentLookupException
- Specified by:
lookup
in interface PlexusContainer
- Throws:
ComponentLookupException
lookupMap
public java.util.Map lookupMap(java.lang.String role)
throws ComponentLookupException
- Specified by:
lookupMap
in interface PlexusContainer
- Throws:
ComponentLookupException
lookupList
public java.util.List lookupList(java.lang.String role)
throws ComponentLookupException
- Specified by:
lookupList
in interface PlexusContainer
- Throws:
ComponentLookupException
lookup
public java.lang.Object lookup(java.lang.String role,
java.lang.String id)
throws ComponentLookupException
- Specified by:
lookup
in interface PlexusContainer
- Throws:
ComponentLookupException
getComponentDescriptorMap
public java.util.Map getComponentDescriptorMap(java.lang.String role)
- Specified by:
getComponentDescriptorMap
in interface PlexusContainer
getComponentDescriptor
public ComponentDescriptor getComponentDescriptor(java.lang.String role)
- Specified by:
getComponentDescriptor
in interface PlexusContainer
releaseAll
public void releaseAll(java.util.Map components)
- Specified by:
releaseAll
in interface PlexusContainer
releaseAll
public void releaseAll(java.util.List components)
- Specified by:
releaseAll
in interface PlexusContainer
hasComponent
public boolean hasComponent(java.lang.String componentKey)
- Specified by:
hasComponent
in interface PlexusContainer
hasComponent
public boolean hasComponent(java.lang.String role,
java.lang.String id)
- Specified by:
hasComponent
in interface PlexusContainer
suspend
public void suspend(java.lang.Object component)
- Specified by:
suspend
in interface PlexusContainer
resume
public void resume(java.lang.Object component)
- Specified by:
resume
in interface PlexusContainer
release
public void release(java.lang.Object component)
- Specified by:
release
in interface PlexusContainer
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface PlexusContainer
- Throws:
java.lang.Exception
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface PlexusContainer
- Throws:
java.lang.Exception
dispose
public void dispose()
- Specified by:
dispose
in interface PlexusContainer
disposeAllComponents
protected void disposeAllComponents()
addContextValue
public void addContextValue(java.lang.Object key,
java.lang.Object value)
- Specified by:
addContextValue
in interface PlexusContainer
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
setClassWorld
public void setClassWorld(org.codehaus.classworlds.ClassWorld classWorld)
setConfigurationResource
public void setConfigurationResource(java.io.Reader configuration)
throws PlexusConfigurationResourceException
- Specified by:
setConfigurationResource
in interface PlexusContainer
- Throws:
PlexusConfigurationResourceException
- See Also:
PlexusContainer.setConfigurationResource(Reader)
getClassLoader
public java.lang.ClassLoader getClassLoader()
loadOnStart
protected void loadOnStart()
throws java.lang.Exception
- Load specifies roles during server startup.
- Throws:
java.lang.Exception
initializeClassLoader
private void initializeClassLoader()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeContext
private void initializeContext()
initializeDefaultConfiguration
private void initializeDefaultConfiguration()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeConfiguration
private void initializeConfiguration()
throws java.lang.Exception
- Throws:
java.lang.Exception
getInterpolationConfigurationReader
private java.io.Reader getInterpolationConfigurationReader(java.io.Reader reader)
processConfigurationsDirectory
private void processConfigurationsDirectory()
throws java.lang.Exception
- Process any additional component configuration files that have been
specified. The specified directory is scanned recursively so configurations
can be within nested directories to help with component organization.
- Throws:
java.lang.Exception
getMergedConfiguration
private PlexusConfiguration getMergedConfiguration()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeLoggerManager
private void initializeLoggerManager()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeComponentRepository
private void initializeComponentRepository()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeResourceManager
private void initializeResourceManager()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeSystemProperties
private void initializeSystemProperties()
throws java.lang.Exception
- Initialize system properties.
If the application needs to setup any system properties than they will
be initialized here.
- Throws:
java.lang.Exception
setLoggerManager
private void setLoggerManager(LoggerManager loggerManager)
getLoggerManager
private LoggerManager getLoggerManager()
getConfiguration
private PlexusConfiguration getConfiguration()
setConfiguration
private void setConfiguration(PlexusConfiguration configuration)
getConfigurationReader
private java.io.Reader getConfigurationReader()
setResourceManager
private void setResourceManager(DefaultResourceManager resourceManager)
getContext
private DefaultContext getContext()
setComponentRepository
private void setComponentRepository(ComponentRepository componentRepository)
getDefaultConfiguration
private PlexusConfiguration getDefaultConfiguration()
setDefaultConfiguration
private void setDefaultConfiguration(PlexusConfiguration defaultConfiguration)
getClassWorld
private org.codehaus.classworlds.ClassWorld getClassWorld()
initializeComponentConfigurator
private void initializeComponentConfigurator()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeComponentComposer
private void initializeComponentComposer()
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeComponentManagerManager
private void initializeComponentManagerManager()
throws java.lang.Exception
- Throws:
java.lang.Exception
instantiateComponentManager
public ComponentManager instantiateComponentManager(ComponentDescriptor descriptor)
throws java.lang.Exception
- Throws:
java.lang.Exception
getComponentManagers
java.util.Map getComponentManagers()
getComponentManager
ComponentManager getComponentManager(java.lang.String componentKey)
findComponentManager
protected ComponentManager findComponentManager(java.lang.Object component)
initializeLifecycleHandlerManager
private void initializeLifecycleHandlerManager()
throws java.lang.Exception
- Throws:
java.lang.Exception