|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.excalibur.instrument.manager.impl.InstrumentProxy
Instrumentables which do not implement ThreadSafe may have multiple instances created by the ComponentLocator. Each of these Instruments will share a common key and are instrumented as a group. The InstrumentProxy is used make it easy for the InstrumentManager to control groups of Instruments as one.
The type of a Instrument can not be determined at configuration time. It is resolved when the Instrumentable actually registers the Instrument.
Method Summary | |
void |
configure(Configuration configuration)
Configures the Instrument. |
void |
enableLogging(Logger logger)
Set the components logger. |
static java.lang.String |
getTypeName(int type)
Returns the name of a Instrument type. |
void |
increment(int count)
Increments the Instrument by a specified count. |
boolean |
isActive()
Used by classes being instrumented so that they can avoid unnecessary code when the data from a Instrument is not being used. |
void |
setValue(int value)
Sets the current value of the Instrument. |
protected void |
stateChanged()
Called whenever the state of the instrument is changed. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void enableLogging(Logger logger)
AbstractLogEnabled
enableLogging
in interface LogEnabled
enableLogging
in class AbstractLogEnabled
logger
- the loggerpublic void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configuration
- Instrument configuration element from the
InstrumentManager's configuration.
ConfigurationException
- If there are any configuration problems.public boolean isActive()
isActive
in interface InstrumentProxy
public void increment(int count)
increment
in interface InstrumentProxy
count
- A positive integer to increment the counter by.public void setValue(int value)
setValue
in interface InstrumentProxy
value
- The new value for the Instrument.protected void stateChanged()
public static java.lang.String getTypeName(int type)
type
- Type whose name is wanted.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |