org.apache.cocoon.components.treeprocessor
Class SimpleSelectorProcessingNode

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.components.treeprocessor.AbstractProcessingNode
          extended byorg.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode
              extended byorg.apache.cocoon.components.treeprocessor.SimpleParentProcessingNode
                  extended byorg.apache.cocoon.components.treeprocessor.SimpleSelectorProcessingNode
All Implemented Interfaces:
Disposable, org.apache.cocoon.sitemap.ExecutionContext, org.apache.cocoon.util.location.Locatable, ProcessingNode, Serviceable, ThreadSafe
Direct Known Subclasses:
ActTypeNode, MatchNode, PreparableMatchNode, SelectNode, SwitchSelectNode

public abstract class SimpleSelectorProcessingNode
extends SimpleParentProcessingNode
implements Serviceable, Disposable

Base class for processing nodes that are based on a component in a Selector (act, match, select, etc).

Version:
$Id: SimpleSelectorProcessingNode.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from class org.apache.cocoon.components.treeprocessor.SimpleParentProcessingNode
children
 
Fields inherited from class org.apache.cocoon.components.treeprocessor.AbstractProcessingNode
componentName, executor, location
 
Constructor Summary
SimpleSelectorProcessingNode(String selectorRole, String componentType)
           
 
Method Summary
 void dispose()
           
protected  Object getComponent()
          Get the component to be used by this node.
protected  void releaseComponent(Object obj)
          Release the component used by this node (does nothing if it's the cached ThreadSafe component)
 void service(ServiceManager avalonManager)
           
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.SimpleParentProcessingNode
hasChildren, invoke, setChildren
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode
invokeNodes, invokeNodes
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.AbstractProcessingNode
getLocation, getType, setLocation, setSitemapExecutor
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSelectorProcessingNode

public SimpleSelectorProcessingNode(String selectorRole,
                                    String componentType)
Method Detail

service

public void service(ServiceManager avalonManager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

getComponent

protected Object getComponent()
                       throws ServiceException
Get the component to be used by this node. That component may be cached for faster execution if it's ThreadSafe. In any case, a call to releaseComponent(Object) must be done to release the component if needed.

Returns:
the component to use
Throws:
ServiceException - if component lookup fails

releaseComponent

protected void releaseComponent(Object obj)
Release the component used by this node (does nothing if it's the cached ThreadSafe component)

Parameters:
obj - the component

dispose

public void dispose()
Specified by:
dispose in interface Disposable


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.