Class AbstractComponentManager<T>
java.lang.Object
org.codehaus.plexus.component.manager.AbstractComponentManager<T>
- All Implemented Interfaces:
ComponentManager<T>
- Direct Known Subclasses:
PerLookupComponentManager
,SingletonComponentManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ComponentBuilder<T>
Contains a mapping from singleton instances to the realms they were used to configure with.protected final ComponentDescriptor<T>
protected final MutablePlexusContainer
Fields inherited from interface org.codehaus.plexus.component.manager.ComponentManager
NEXT_START_ID, ROLE
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractComponentManager
(MutablePlexusContainer container, LifecycleHandler lifecycleHandler, ComponentDescriptor<T> componentDescriptor, String role, String roleHint) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected T
protected void
void
dissociateComponentRealm
(org.codehaus.plexus.classworlds.realm.ClassRealm realm) protected void
endComponentLifecycle
(Object component) int
org.codehaus.plexus.classworlds.realm.ClassRealm
getRealm()
getRole()
long
Deprecated.for internal use only.. will be removedgetType()
protected void
void
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, release
-
Field Details
-
container
-
componentDescriptor
-
builder
-
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. This will define a synchronized map, make sure to synchronize the map when iterating.
-
-
Constructor Details
-
AbstractComponentManager
public AbstractComponentManager(MutablePlexusContainer container, LifecycleHandler lifecycleHandler, ComponentDescriptor<T> componentDescriptor, String role, String roleHint)
-
-
Method Details
-
getComponentDescriptor
- Specified by:
getComponentDescriptor
in interfaceComponentManager<T>
-
getType
- Specified by:
getType
in interfaceComponentManager<T>
-
getRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getRealm()- Specified by:
getRealm
in interfaceComponentManager<T>
-
getRole
- Specified by:
getRole
in interfaceComponentManager<T>
-
getRoleHint
- Specified by:
getRoleHint
in interfaceComponentManager<T>
-
getLifecycleHandler
- Specified by:
getLifecycleHandler
in interfaceComponentManager<T>
- Returns:
LifecycleHandler
.
-
incrementConnectionCount
protected void incrementConnectionCount() -
decrementConnectionCount
protected void decrementConnectionCount() -
connected
protected boolean connected() -
getConnections
public int getConnections()- Specified by:
getConnections
in interfaceComponentManager<T>
-
start
- Specified by:
start
in interfaceComponentManager<T>
- Throws:
PhaseExecutionException
-
getStartId
public long getStartId()Deprecated.for internal use only.. will be removed- Specified by:
getStartId
in interfaceComponentManager<T>
- Returns:
- The start id.
-
createComponentInstance
protected T createComponentInstance() throws ComponentInstantiationException, ComponentLifecycleException -
endComponentLifecycle
- Throws:
ComponentLifecycleException
-
getContainer
- Specified by:
getContainer
in interfaceComponentManager<T>
-
getLogger
-
dissociateComponentRealm
public void dissociateComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) throws ComponentLifecycleException - Specified by:
dissociateComponentRealm
in interfaceComponentManager<T>
- Throws:
ComponentLifecycleException
-