org.codehaus.plexus.component.manager
Class KeepAliveSingletonComponentManager

java.lang.Object
  extended by org.codehaus.plexus.component.manager.AbstractComponentManager
      extended by org.codehaus.plexus.component.manager.KeepAliveSingletonComponentManager
All Implemented Interfaces:
java.lang.Cloneable, ComponentManager

public class KeepAliveSingletonComponentManager
extends AbstractComponentManager

This ensures a component is only used as a singleton, and is only shutdown when the container shuts down.

Version:
$Id: KeepAliveSingletonComponentManager.java 6974 2007-10-21 07:39:26Z jvanzyl $
Author:
Bert van Brakel

Field Summary
private  java.lang.Object lock
           
private  java.lang.Object singleton
           
 
Fields inherited from class org.codehaus.plexus.component.manager.AbstractComponentManager
componentContextRealms, componentDescriptor, container
 
Fields inherited from interface org.codehaus.plexus.component.manager.ComponentManager
ROLE
 
Constructor Summary
KeepAliveSingletonComponentManager()
           
 
Method Summary
 void dispose()
           
 java.lang.Object getComponent(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
           
 java.lang.String getId()
           
 void release(java.lang.Object component)
           
 
Methods inherited from class org.codehaus.plexus.component.manager.AbstractComponentManager
connected, copy, createComponentInstance, createComponentInstance, decrementConnectionCount, endComponentLifecycle, getComponent, getComponentDescriptor, getConnections, getContainer, getLifecycleHandler, getLogger, incrementConnectionCount, initialize, setup, startComponentLifecycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

private java.lang.Object lock

singleton

private java.lang.Object singleton
Constructor Detail

KeepAliveSingletonComponentManager

public KeepAliveSingletonComponentManager()
Method Detail

getId

public java.lang.String getId()

release

public void release(java.lang.Object component)

dispose

public void dispose()
             throws ComponentLifecycleException
Throws:
ComponentLifecycleException

getComponent

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