Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » components » [javadoc | source]
org.apache.cocoon.components
public final class: CocoonComponentManager [javadoc | source]
java.lang.Object
   org.apache.avalon.excalibur.component.ExcaliburComponentManager
      org.apache.cocoon.components.CocoonComponentManager

All Implemented Interfaces:
    org.apache.excalibur.source.SourceResolver, org.apache.avalon.framework.component.Component

Cocoon Component Manager. This manager extends the ExcaliburComponentManager by a special lifecycle handling for a RequestLifecycleComponent and by handling the lookup of the SourceResolver . WARNING: This is a "private" Cocoon core class - do NOT use this class directly - and do not assume that a ComponentManager you get via the compose() method is an instance of CocoonComponentManager.
Nested Class Summary:
abstract public static class  CocoonComponentManager.AbstractCocoonRunnable  A runnable wrapper that inherits the environment stack of the thread it is created in.

It's defined as an abstract class here to use some internals of EnvironmentHelper, and should only be used through its public counterpart, {@link org.apache.cocoon.environment.CocoonRunnable} 

Field Summary
protected static final  ThreadLocal environmentStack    The environment information 
Constructor:
 public CocoonComponentManager() 
 public CocoonComponentManager(ClassLoader loader) 
    Create the ComponentManager with a Classloader
 public CocoonComponentManager(ComponentManager manager) 
    Create the ComponentManager with a parent ComponentManager
 public CocoonComponentManager(ComponentManager manager,
    ClassLoader loader) 
    Create the ComponentManager with a Classloader and parent ComponentManager
Method from org.apache.cocoon.components.CocoonComponentManager Summary:
addComponent,   addComponentForAutomaticRelease,   addComponentForAutomaticRelease,   checkEnvironment,   createEnvironmentAwareConsumer,   dispose,   endProcessing,   enterEnvironment,   getActiveProcessor,   getCurrentEnvironment,   getCurrentProcessor,   getSitemapComponentManager,   initialize,   leaveEnvironment,   leaveEnvironment,   lookup,   markEnvironment,   release,   release,   releaseRLComponent,   removeFromAutomaticRelease,   resolveURI,   resolveURI,   setInstrumentManager,   setParentManager,   startProcessing
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.components.CocoonComponentManager Detail:
 public  void addComponent(String role,
    Class clazz,
    Configuration conf) throws ComponentException 
 public static  void addComponentForAutomaticRelease(ComponentManager manager,
    Component component) throws ProcessingException 
    Add an automatically released component
 public static  void addComponentForAutomaticRelease(ComponentSelector selector,
    Component component,
    ComponentManager manager) throws ProcessingException 
    Add an automatically released component
 public static  void checkEnvironment(int depth,
    Logger logger) throws Exception 
    INTERNAL METHOD. Do not use, can be removed without warning or deprecation cycle.
 public static XMLConsumer createEnvironmentAwareConsumer(XMLConsumer consumer) 
    Create an environment aware xml consumer for the cocoon protocol
 public  void dispose() 
    Dispose
 public static  void endProcessing(Environment env,
    Object key) 
    This hook has to be called before a request is processed. The hook is called by the Cocoon component and by the cocoon protocol implementation.
 public static  void enterEnvironment(Environment env,
    ComponentManager manager,
    Processor processor) 
    This hook must be called by the sitemap each time a sitemap is entered This method should never raise an exception, except when the parameters are not set!
 public static Processor getActiveProcessor(Environment env) 
    Return the processor that has actually processed the request
 public static Environment getCurrentEnvironment() 
    Return the current environment (for the cocoon: protocol)
 public static Processor getCurrentProcessor() 
    Return the current processor (for the cocoon: protocol)
 public static ComponentManager getSitemapComponentManager() 
    Get the current sitemap component manager. This method return the current sitemap component manager. This is the manager that holds all the components of the currently processed (sub)sitemap.
 public  void initialize() throws Exception 
 public static  void leaveEnvironment() 
 public static  void leaveEnvironment(boolean success) 
 public Component lookup(String role) throws ComponentException 
    Return an instance of a component based on a Role. The Role is usually the Interface's Fully Qualified Name(FQN)--unless there are multiple Components for the same Role. In that case, the Role's FQN is appended with "Selector", and we return a ComponentSelector.
 public static int markEnvironment() 
    INTERNAL METHOD. Do not use, can be removed without warning or deprecation cycle.
 public  void release(Component component) 
    Release a Component. This implementation makes sure it has a handle on the propper ComponentHandler, and let's the ComponentHandler take care of the actual work.
 public  void release(Source source) 
    Releases a resolved resource
 protected  void releaseRLComponent(Component component) 
    Release a RequestLifecycleComponent
 public static  void removeFromAutomaticRelease(Component component) throws ProcessingException 
    Remove from automatically released components
 public Source resolveURI(String location) throws MalformedURLException, SourceException, IOException 
    Get a Source object.
 public Source resolveURI(String location,
    String baseURI,
    Map parameters) throws MalformedURLException, SourceException, IOException 
    Get a Source object.
 public  void setInstrumentManager(InstrumentManager iManager) 
 protected  void setParentManager(ComponentManager manager) 
 public static Object startProcessing(Environment env) 
    This hook has to be called before a request is processed. The hook is called by the Cocoon component and by the cocoon protocol implementation. This method should never raise an exception, except when the environment is not set.