|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.excalibur.instrument.manager.impl.InstrumentableProxy
class InstrumentableProxy
A InstrumentableProxy makes it easy for the InstrumentManager to manage Instrumentables and their Instruments.
Not Synchronized.
Field Summary | |
---|---|
private org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] |
m_childInstrumentableDescriptorArray
Optimized array of the child InstrumentableDescriptors. |
private java.util.HashMap |
m_childInstrumentableProxies
Map of the Child InstrumentableProxies owned by this InstrumentableProxy. |
private InstrumentableProxy[] |
m_childInstrumentableProxyArray
Optimized array of the child InstrumentableProxies. |
private boolean |
m_configured
Configured flag. |
private java.lang.String |
m_description
The description of the Instrumentable. |
private InstrumentableDescriptorImpl |
m_descriptor
The Descriptor for the Instrumentable. |
private org.apache.excalibur.instrument.manager.InstrumentDescriptor[] |
m_instrumentDescriptorArray
Optimized array of the InstrumentDescriptors. |
private DefaultInstrumentManagerImpl |
m_instrumentManager
InstrumentManager which owns the proxy. |
private java.util.HashMap |
m_instrumentProxies
Map of the InstrumentProxies owned by this InstrumentableProxy. |
private InstrumentProxy[] |
m_instrumentProxyArray
Optimized array of the InstrumentProxies. |
private java.lang.String |
m_name
The name used to identify a Instrumentable. |
private InstrumentableProxy |
m_parentInstrumentableProxy
The parent Instrumentable proxy or null if this is a top level Instrumentable. |
private boolean |
m_registered
Registered flag. |
private int |
m_stateVersion
State Version. |
Constructor Summary | |
---|---|
InstrumentableProxy(DefaultInstrumentManagerImpl instrumentManager,
InstrumentableProxy parentInstrumentableProxy,
java.lang.String name,
java.lang.String description)
Creates a new InstrumentableProxy. |
Method Summary | |
---|---|
(package private) void |
addChildInstrumentableProxy(InstrumentableProxy childInstrumentableProxy)
Adds a child InstrumentableProxy to the Instrumentable. |
(package private) void |
addInstrumentProxy(InstrumentProxy instrumentProxy)
Adds a InstrumentProxy to the Instrumentable. |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Configures the Instrumentable. |
(package private) org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] |
getChildInstrumentableDescriptors()
Returns an array of Descriptors for the child Instrumentables in this Instrumentable. |
(package private) InstrumentableProxy[] |
getChildInstrumentableProxies()
Returns an array of Proxies to the child Instrumentables in this Instrumentable. |
(package private) InstrumentableProxy |
getChildInstrumentableProxy(java.lang.String childInstrumentableName)
Returns a child InstrumentableProxy based on its name or the name of any of its children. |
(package private) InstrumentableProxy |
getChildInstrumentableProxy(java.lang.String childInstrumentableName,
boolean create)
|
(package private) java.lang.String |
getDescription()
Gets the description of the Instrumentable. |
(package private) org.apache.excalibur.instrument.manager.InstrumentableDescriptor |
getDescriptor()
Returns a Descriptor for the Instrumentable. |
(package private) org.apache.excalibur.instrument.manager.InstrumentDescriptor[] |
getInstrumentDescriptors()
Returns an array of Descriptors for the Instruments in the Instrumentable. |
(package private) DefaultInstrumentManagerImpl |
getInstrumentManager()
Returns instrumentManager which owns the proxy. |
(package private) InstrumentProxy[] |
getInstrumentProxies()
Returns an array of Proxies to the Instruments in the Instrumentable. |
(package private) InstrumentProxy |
getInstrumentProxy(java.lang.String instrumentName)
Returns a InstrumentProxy based on its name or the name of any of its children. |
(package private) InstrumentProxy |
getInstrumentProxy(java.lang.String instrumentName,
boolean create)
|
(package private) java.lang.String |
getName()
Gets the name for the Instrumentable. |
(package private) InstrumentableProxy |
getParentInstrumentableProxy()
Returns the parent InstrumentableProxy or null if this is a top level proxy. |
(package private) int |
getStateVersion()
Returns the stateVersion of the instrumentable. |
(package private) boolean |
isConfigured()
Returns true if the instrumentable was configured in the instrumentables section of the configuration. |
(package private) boolean |
isRegistered()
Returns true if the Instrumentable was registered with the Instrument Manager. |
(package private) void |
setDescription(java.lang.String description)
Sets the description for the instrumentable object. |
(package private) void |
setRegistered()
Called by the InstrumentManager whenever an Instrumentable assigned to this proxy is registered. |
protected void |
stateChanged()
Called whenever the state of the instrumentable is changed. |
private org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] |
updateChildInstrumentableDescriptorArray()
Updates the cached array of child InstrumentableDescriptors taking synchronization into account. |
private InstrumentableProxy[] |
updateChildInstrumentableProxyArray()
Updates the cached array of child InstrumentableProxies taking synchronization into account. |
private org.apache.excalibur.instrument.manager.InstrumentDescriptor[] |
updateInstrumentDescriptorArray()
Updates the cached array of InstrumentDescriptors taking synchronization into account. |
private InstrumentProxy[] |
updateInstrumentProxyArray()
Updates the cached array of InstrumentProxies taking synchronization into account. |
(package private) void |
writeState(java.io.PrintWriter out)
Writes the current state to a PrintWriter as XML. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private DefaultInstrumentManagerImpl m_instrumentManager
private InstrumentableProxy m_parentInstrumentableProxy
private boolean m_configured
private boolean m_registered
private java.lang.String m_name
private java.lang.String m_description
private InstrumentableDescriptorImpl m_descriptor
private java.util.HashMap m_childInstrumentableProxies
private InstrumentableProxy[] m_childInstrumentableProxyArray
private org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] m_childInstrumentableDescriptorArray
private java.util.HashMap m_instrumentProxies
private InstrumentProxy[] m_instrumentProxyArray
private org.apache.excalibur.instrument.manager.InstrumentDescriptor[] m_instrumentDescriptorArray
private int m_stateVersion
Constructor Detail |
---|
InstrumentableProxy(DefaultInstrumentManagerImpl instrumentManager, InstrumentableProxy parentInstrumentableProxy, java.lang.String name, java.lang.String description)
instrumentManager
- InstrumentManager which owns the proxy.parentInstrumentableProxy
- The parent Instrumentable proxy or null
if this is a top level Instrumentable.name
- The name used to identify a Instrumentable.description
- The description of the the Instrumentable.Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configuration
- Instrumentable configuration element from the
InstrumentManager's configuration.
org.apache.avalon.framework.configuration.ConfigurationException
- If there are any configuration problems.DefaultInstrumentManagerImpl getInstrumentManager()
InstrumentableProxy getParentInstrumentableProxy()
boolean isConfigured()
boolean isRegistered()
void setRegistered()
java.lang.String getName()
void setDescription(java.lang.String description)
description
- The description of the Instrumentable.java.lang.String getDescription()
org.apache.excalibur.instrument.manager.InstrumentableDescriptor getDescriptor()
void addChildInstrumentableProxy(InstrumentableProxy childInstrumentableProxy)
This method should never be called for child Instrumentables which have already been added.
childInstrumentableProxy
- Child InstrumentableProxy to be added.InstrumentableProxy getChildInstrumentableProxy(java.lang.String childInstrumentableName, boolean create)
InstrumentableProxy getChildInstrumentableProxy(java.lang.String childInstrumentableName)
childInstrumentableName
- Name of the child Instrumentable being
requested.
InstrumentableProxy[] getChildInstrumentableProxies()
org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] getChildInstrumentableDescriptors()
private InstrumentableProxy[] updateChildInstrumentableProxyArray()
private org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] updateChildInstrumentableDescriptorArray()
void addInstrumentProxy(InstrumentProxy instrumentProxy)
This method should never be called for Instruments which have already been added.
instrumentProxy
- InstrumentProxy to be added.InstrumentProxy getInstrumentProxy(java.lang.String instrumentName, boolean create)
InstrumentProxy getInstrumentProxy(java.lang.String instrumentName)
instrumentName
- Name of the Instrument being requested.
InstrumentProxy[] getInstrumentProxies()
org.apache.excalibur.instrument.manager.InstrumentDescriptor[] getInstrumentDescriptors()
int getStateVersion()
private InstrumentProxy[] updateInstrumentProxyArray()
private org.apache.excalibur.instrument.manager.InstrumentDescriptor[] updateInstrumentDescriptorArray()
void writeState(java.io.PrintWriter out)
out
- The PrintWriter to which the state should be written.protected void stateChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |