org.codehaus.plexus.component.manager
Class AbstractComponentManager

java.lang.Object
  extended by org.codehaus.plexus.component.manager.AbstractComponentManager
All Implemented Interfaces:
java.lang.Cloneable, ComponentManager
Direct Known Subclasses:
ComponentLookupManagerComponentManager, PerLookupComponentManager, SingletonComponentManager

public abstract class AbstractComponentManager
extends java.lang.Object
implements ComponentManager, java.lang.Cloneable


Field Summary
protected  ComponentBuilder builder
           
protected  java.util.Map<java.lang.Object,org.codehaus.plexus.classworlds.realm.ClassRealm> componentContextRealms
          Contains a mapping from singleton instances to the realms they were used to configure with.
protected  ComponentDescriptor componentDescriptor
           
protected  MutablePlexusContainer container
           
 
Fields inherited from interface org.codehaus.plexus.component.manager.ComponentManager
ROLE
 
Constructor Summary
protected AbstractComponentManager()
           
 
Method Summary
protected  boolean connected()
           
 ComponentManager copy()
           
protected  ComponentBuilder createComponentBuilder()
           
protected  java.lang.Object createComponentInstance(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
           
protected  void decrementConnectionCount()
           
 void dissociateComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
           
protected  void endComponentLifecycle(java.lang.Object component)
           
 java.lang.Object getComponent()
           
 ComponentDescriptor getComponentDescriptor()
           
 int getConnections()
           
 MutablePlexusContainer getContainer()
           
 LifecycleHandler getLifecycleHandler()
           
 Logger getLogger()
           
 java.lang.String getRole()
           
 java.lang.String getRoleHint()
           
protected  void incrementConnectionCount()
           
 void initialize()
           
 void setup(MutablePlexusContainer container, LifecycleHandler lifecycleHandler, ComponentDescriptor componentDescriptor, java.lang.String role, java.lang.String roleHint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.plexus.component.manager.ComponentManager
dispose, getComponent, getId, release
 

Field Detail

container

protected MutablePlexusContainer container

componentDescriptor

protected ComponentDescriptor componentDescriptor

builder

protected ComponentBuilder builder

componentContextRealms

protected final java.util.Map<java.lang.Object,org.codehaus.plexus.classworlds.realm.ClassRealm> componentContextRealms
Contains a mapping from singleton instances to the realms they were used to configure with. This realm will be used to call all lifecycle methods.

Constructor Detail

AbstractComponentManager

protected AbstractComponentManager()
Method Detail

createComponentBuilder

protected ComponentBuilder createComponentBuilder()

copy

public ComponentManager copy()
Specified by:
copy in interface ComponentManager

getComponentDescriptor

public ComponentDescriptor getComponentDescriptor()
Specified by:
getComponentDescriptor in interface ComponentManager

getRole

public java.lang.String getRole()
Specified by:
getRole in interface ComponentManager

getRoleHint

public java.lang.String getRoleHint()
Specified by:
getRoleHint in interface ComponentManager

getLifecycleHandler

public LifecycleHandler getLifecycleHandler()
Specified by:
getLifecycleHandler in interface ComponentManager

incrementConnectionCount

protected void incrementConnectionCount()

decrementConnectionCount

protected void decrementConnectionCount()

connected

protected boolean connected()

getConnections

public int getConnections()
Specified by:
getConnections in interface ComponentManager

setup

public void setup(MutablePlexusContainer container,
                  LifecycleHandler lifecycleHandler,
                  ComponentDescriptor componentDescriptor,
                  java.lang.String role,
                  java.lang.String roleHint)
Specified by:
setup in interface ComponentManager

initialize

public void initialize()
Specified by:
initialize in interface ComponentManager

createComponentInstance

protected java.lang.Object createComponentInstance(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
                                            throws ComponentInstantiationException,
                                                   ComponentLifecycleException
Throws:
ComponentInstantiationException
ComponentLifecycleException

endComponentLifecycle

protected void endComponentLifecycle(java.lang.Object component)
                              throws ComponentLifecycleException
Throws:
ComponentLifecycleException

getContainer

public MutablePlexusContainer getContainer()
Specified by:
getContainer in interface ComponentManager

getLogger

public Logger getLogger()

getComponent

public java.lang.Object getComponent()
                              throws ComponentInstantiationException,
                                     ComponentLifecycleException
Specified by:
getComponent in interface ComponentManager
Throws:
ComponentInstantiationException
ComponentLifecycleException

dissociateComponentRealm

public void dissociateComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
                              throws ComponentLifecycleException
Specified by:
dissociateComponentRealm in interface ComponentManager
Throws:
ComponentLifecycleException


Copyright © 2001-2008 Codehaus. All Rights Reserved.