org.apache.excalibur.instrument.manager.impl
Class InstrumentableDescriptorImpl

java.lang.Object
  extended byorg.apache.excalibur.instrument.manager.impl.InstrumentableDescriptorImpl
All Implemented Interfaces:
InstrumentableDescriptor

public class InstrumentableDescriptorImpl
extends java.lang.Object
implements InstrumentableDescriptor

Describes a Instrumentable and acts as a Proxy to protect the original Instrumentable.

Since:
4.1
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:25 $
Author:
Avalon Development Team

Method Summary
 InstrumentableDescriptor getChildInstrumentableDescriptor(java.lang.String childInstrumentableName)
          Returns a child InstrumentableDescriptor based on its name or the name of any of its children.
 InstrumentableDescriptor[] getChildInstrumentableDescriptors()
          Returns an array of Descriptors for the child Instrumentables registered by this Instrumentable.
 java.lang.String getDescription()
          Gets the description of the Instrumentable.
 InstrumentDescriptor getInstrumentDescriptor(java.lang.String instrumentName)
          Returns a InstrumentDescriptor based on its name.
 InstrumentDescriptor[] getInstrumentDescriptors()
          Returns an array of Descriptors for the Instruments registered by this Instrumentable.
 java.lang.String getName()
          Gets the name for the Instrumentable.
 InstrumentableDescriptor getParentInstrumentableDescriptor()
          Returns the parent InstrumentableDescriptor or null if this is a top level instrumentable.
 int getStateVersion()
          Returns the stateVersion of the instrumentable.
 boolean isConfigured()
          Returns true if the Instrumentable was configured in the instrumentables section of the configuration.
 boolean isRegistered()
          Returns true if the Instrumentable was registered with the Instrument Manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isConfigured

public boolean isConfigured()
Returns true if the Instrumentable was configured in the instrumentables section of the configuration.

Specified by:
isConfigured in interface InstrumentableDescriptor
Returns:
True if configured.

isRegistered

public boolean isRegistered()
Returns true if the Instrumentable was registered with the Instrument Manager.

Specified by:
isRegistered in interface InstrumentableDescriptor
Returns:
True if registered.

getName

public java.lang.String getName()
Gets the name for the Instrumentable. The Instrumentable Name is used to uniquely identify the Instrumentable during its configuration and to gain access to a InstrumentableDescriptor through a DefaultInstrumentManager.

Specified by:
getName in interface InstrumentableDescriptor
Returns:
The name used to identify a Instrumentable.

getDescription

public java.lang.String getDescription()
Gets the description of the Instrumentable.

Specified by:
getDescription in interface InstrumentableDescriptor
Returns:
The description of the Instrumentable.

getParentInstrumentableDescriptor

public InstrumentableDescriptor getParentInstrumentableDescriptor()
Returns the parent InstrumentableDescriptor or null if this is a top level instrumentable.

Specified by:
getParentInstrumentableDescriptor in interface InstrumentableDescriptor
Returns:
The parent InstrumentableDescriptor or null.

getChildInstrumentableDescriptor

public InstrumentableDescriptor getChildInstrumentableDescriptor(java.lang.String childInstrumentableName)
                                                          throws NoSuchInstrumentableException
Returns a child InstrumentableDescriptor based on its name or the name of any of its children.

Specified by:
getChildInstrumentableDescriptor in interface InstrumentableDescriptor
Parameters:
childInstrumentableName - Name of the child Instrumentable being requested.
Returns:
A descriptor of the requested child Instrumentable.
Throws:
NoSuchInstrumentableException - If the specified Instrumentable does not exist.

getChildInstrumentableDescriptors

public InstrumentableDescriptor[] getChildInstrumentableDescriptors()
Returns an array of Descriptors for the child Instrumentables registered by this Instrumentable.

Specified by:
getChildInstrumentableDescriptors in interface InstrumentableDescriptor
Returns:
An array of Descriptors for the child Instrumentables registered by this Instrumentable.

getInstrumentDescriptor

public InstrumentDescriptor getInstrumentDescriptor(java.lang.String instrumentName)
                                             throws NoSuchInstrumentException
Returns a InstrumentDescriptor based on its name.

Specified by:
getInstrumentDescriptor in interface InstrumentableDescriptor
Parameters:
instrumentName - Name of the Instrument being requested.
Returns:
A Descriptor of the requested Instrument.
Throws:
NoSuchInstrumentException - If the specified Instrument does not exist.

getInstrumentDescriptors

public InstrumentDescriptor[] getInstrumentDescriptors()
Returns an array of Descriptors for the Instruments registered by this Instrumentable.

Specified by:
getInstrumentDescriptors in interface InstrumentableDescriptor
Returns:
An array of Descriptors for the Instruments registered by this Instrumentable.

getStateVersion

public int getStateVersion()
Returns the stateVersion of the instrumentable. The state version will be incremented each time any of the configuration of the instrumentable or any of its children is modified. Clients can use this value to tell whether or not anything has changed without having to do an exhaustive comparison.

Specified by:
getStateVersion in interface InstrumentableDescriptor
Returns:
The state version of the instrumentable.


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.