public abstract class AbstractLogEnabledInstrumentable extends org.apache.avalon.framework.logger.AbstractLogEnabled implements Instrumentable
Subclasses should call addInstrument or
addChildInstrumentable as part of the component's
initialization.
| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList |
m_childList
Stores the child instrumentables during initialization.
|
private java.lang.String |
m_instrumentableName
Name of the instrumentable.
|
private java.util.ArrayList |
m_instrumentList
Stores the instruments during initialization.
|
private boolean |
m_registered
Flag which is to used to keep track of when the Instrumentable has been registered.
|
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLogEnabledInstrumentable()
Creates a new AbstractLogEnabledInstrumentable.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChildInstrumentable(Instrumentable child)
Adds a child Instrumentable to the list of child Instrumentables
published by the component.
|
protected void |
addInstrument(Instrument instrument)
Adds an Instrument to the list of Instruments published by the component.
|
Instrumentable[] |
getChildInstrumentables()
Any Object which implements Instrumentable can also make use of other
Instrumentable child objects.
|
java.lang.String |
getInstrumentableName()
Gets the name of the Instrumentable.
|
Instrument[] |
getInstruments()
Obtain a reference to all the Instruments that the Instrumentable object
wishes to expose.
|
void |
setInstrumentableName(java.lang.String name)
Sets the name for the Instrumentable.
|
private java.lang.String m_instrumentableName
private java.util.ArrayList m_instrumentList
private java.util.ArrayList m_childList
private boolean m_registered
protected AbstractLogEnabledInstrumentable()
protected void addInstrument(Instrument instrument)
instrument - Instrument to publish.protected void addChildInstrumentable(Instrumentable child)
Note that Child Instrumentables must be named by the caller using the setInstrumentableName method.
child - Child Instrumentable to publish.public final java.lang.String getInstrumentableName()
getInstrumentableName in interface Instrumentablepublic final void setInstrumentableName(java.lang.String name)
This value may be set by a parent Instrumentable, or by the InstrumentManager using the value of the 'instrumentable' attribute in the configuration of the component.
setInstrumentableName in interface Instrumentablename - The name used to identify a Instrumentable.public final Instrumentable[] getChildInstrumentables()
getChildInstrumentables in interface Instrumentablepublic final Instrument[] getInstruments()
getInstruments in interface Instrumentable