org.codehaus.plexus.component.manager

Class ClassicSingletonComponentManager

Implemented Interfaces:
Cloneable, ComponentManager

public class ClassicSingletonComponentManager
extends AbstractComponentManager

This ensures only a single manager of a a component exists. Once no more connections for this component exists it is disposed.
Version:
$Id: ClassicSingletonComponentManager.java 1750 2005-04-19 07:45:02Z brett $
Authors:
Jason van Zyl
Bert van Brakel

Fields inherited from interface org.codehaus.plexus.component.manager.ComponentManager

ROLE

Method Summary

void
dispose()
Object
getComponent()
void
release(Object component)

Methods inherited from class org.codehaus.plexus.component.manager.AbstractComponentManager

connected, copy, createComponentInstance, decrementConnectionCount, endComponentLifecycle, getComponentDescriptor, getConnections, getContainer, getId, getLifecycleHandler, getLogger, incrementConnectionCount, initialize, resume, setup, startComponentLifecycle, suspend

Method Details

dispose

public void dispose()
            throws ComponentLifecycleException
Specified by:
dispose in interface ComponentManager

getComponent

public Object getComponent()
            throws ComponentInstantiationException,
                   ComponentLifecycleException
Specified by:
getComponent in interface ComponentManager

release

public void release(Object component)
            throws ComponentLifecycleException
Specified by:
release in interface ComponentManager