org.codehaus.plexus.component.manager
Class SingletonComponentManager

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

public class SingletonComponentManager
extends AbstractComponentManager

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

Author:
Jason van Zyl

Field Summary
 
Fields inherited from class org.codehaus.plexus.component.manager.AbstractComponentManager
builder, componentContextRealms, componentDescriptor, container
 
Fields inherited from interface org.codehaus.plexus.component.manager.ComponentManager
ROLE
 
Constructor Summary
SingletonComponentManager()
           
 
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, createComponentBuilder, createComponentInstance, decrementConnectionCount, dissociateComponentRealm, endComponentLifecycle, getComponent, getComponentDescriptor, getConnections, getContainer, getLifecycleHandler, getLogger, getRole, getRoleHint, incrementConnectionCount, initialize, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonComponentManager

public SingletonComponentManager()
Method Detail

getId

public java.lang.String getId()

release

public void release(java.lang.Object component)
             throws ComponentLifecycleException
Throws:
ComponentLifecycleException

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


Copyright © 2001-2008 Codehaus. All Rights Reserved.