com.ca.jcs.processor
Class AttributeStyleOpProcessorChain

java.lang.Object
  extended by com.ca.jcs.processor.AttributeStyleOpProcessorChain
All Implemented Interfaces:
Activatable

public class AttributeStyleOpProcessorChain
extends Object
implements Activatable

Holder of a chain of proxies around an ultimate concrete AttributeStyleOpProcessor implementation. The life-cycle of the chain is that a list of proxy handler classes is maintained up to the point at which the the chain is activated, at which time the proxy handler and proxy instances are actually created.


Constructor Summary
AttributeStyleOpProcessorChain(MetaConnector metaConnector, AttributeStyleOpProcessor asp)
           
 
Method Summary
 void activate()
          The chain is constructed by first starting with the most specialized connector-developer provided concrete class and then stepping out iteratively creating proxies that are aware of all methods defined on this most specialized class.
 void addClass(Class<? extends ConnectorProcessorProxyHandler> proxyHandlerClass)
           
 void addEntry(ProxyChainEntry entry)
           
 void deactivate()
          This method is called when the target object is no longer needed and should tidy-up any connections / resources it holds.
 int findClass(Class<? extends ConnectorProcessorProxyHandler> proxyHandlerClass)
          Returns true if this chain has been activated and the provided proxyHandlerClass is present in it.
 List<ProxyChainEntry> getChain()
           
 AttributeStyleOpProcessor getFirstAttributeStyleOpProcessor()
           
 AttributeStyleOpProcessor getOpBindingsAttributeStyleOpProcessor()
          Used when invoking methods from optional interfaces like PostQueryAttributesProcessor.
 AttributeStyleOpProcessor getUltimateAttributeStyleOpProcessor()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeStyleOpProcessorChain

public AttributeStyleOpProcessorChain(MetaConnector metaConnector,
                                      AttributeStyleOpProcessor asp)
Method Detail

addClass

public void addClass(Class<? extends ConnectorProcessorProxyHandler> proxyHandlerClass)

findClass

public int findClass(Class<? extends ConnectorProcessorProxyHandler> proxyHandlerClass)
Returns true if this chain has been activated and the provided proxyHandlerClass is present in it.


addEntry

public void addEntry(ProxyChainEntry entry)

getFirstAttributeStyleOpProcessor

public AttributeStyleOpProcessor getFirstAttributeStyleOpProcessor()

getUltimateAttributeStyleOpProcessor

public AttributeStyleOpProcessor getUltimateAttributeStyleOpProcessor()

getOpBindingsAttributeStyleOpProcessor

public AttributeStyleOpProcessor getOpBindingsAttributeStyleOpProcessor()
Used when invoking methods from optional interfaces like PostQueryAttributesProcessor.

Returns:
If any method or script opbindings are active then a proxy processor is returned, otherwise returns getUltimateAttributeStyleOpProcessor().

getChain

public List<ProxyChainEntry> getChain()

toString

public String toString()
Overrides:
toString in class Object

activate

public void activate()
              throws NamingException
The chain is constructed by first starting with the most specialized connector-developer provided concrete class and then stepping out iteratively creating proxies that are aware of all methods defined on this most specialized class.

Specified by:
activate in interface Activatable
Throws:
NamingException

deactivate

public void deactivate()
                throws NamingException
Description copied from interface: Activatable
This method is called when the target object is no longer needed and should tidy-up any connections / resources it holds.

Specified by:
deactivate in interface Activatable
Throws:
NamingException


Created 2011-07-14 13:27 EST