|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.excalibur.instrument.manager.impl.InstrumentDescriptorImpl
public class InstrumentDescriptorImpl
Describes a Instrument and acts as a Proxy to protect the original Instrument.
Field Summary | |
---|---|
private InstrumentProxy |
m_instrumentProxy
InstrumentProxy being described. |
Constructor Summary | |
---|---|
InstrumentDescriptorImpl(InstrumentProxy instrumentProxy)
Creates a new InstrumentDescriptor. |
Method Summary | |
---|---|
void |
addCounterInstrumentListener(org.apache.excalibur.instrument.manager.CounterInstrumentListener listener)
Adds a CounterInstrumentListener to the list of listeners which will receive updates of the value of the Instrument. |
void |
addValueInstrumentListener(org.apache.excalibur.instrument.manager.ValueInstrumentListener listener)
Adds a ValueInstrumentListener to the list of listeners which will receive updates of the value of the Instrument. |
org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor |
createInstrumentSample(java.lang.String sampleDescription,
long sampleInterval,
int sampleSize,
long sampleLease,
int sampleType)
Returns a InstrumentSampleDescriptor based on its name. |
java.lang.String |
getDescription()
Gets the description of the Instrument. |
org.apache.excalibur.instrument.manager.InstrumentableDescriptor |
getInstrumentableDescriptor()
Returns a reference to the descriptor of the Instrumentable of the instrument. |
org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor |
getInstrumentSampleDescriptor(java.lang.String instrumentSampleName)
Returns a InstrumentSampleDescriptor based on its name. |
org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor[] |
getInstrumentSampleDescriptors()
Returns an array of Descriptors for the InstrumentSamples configured for this Instrument. |
java.lang.String |
getName()
Gets the name for the Instrument. |
int |
getStateVersion()
Returns the stateVersion of the instrument. |
int |
getType()
Returns the type of the Instrument. |
boolean |
isConfigured()
Returns true if the Instrument was configured in the instrumentables section of the configuration. |
boolean |
isRegistered()
Returns true if the Instrument was registered with the Instrument Manager. |
void |
removeCounterInstrumentListener(org.apache.excalibur.instrument.manager.CounterInstrumentListener listener)
Removes a InstrumentListener from the list of listeners which will receive profile events. |
void |
removeValueInstrumentListener(org.apache.excalibur.instrument.manager.ValueInstrumentListener listener)
Removes a InstrumentListener from the list of listeners which will receive profile events. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private InstrumentProxy m_instrumentProxy
Constructor Detail |
---|
InstrumentDescriptorImpl(InstrumentProxy instrumentProxy)
instrumentProxy
- InstrumentProxy being described.Method Detail |
---|
public boolean isConfigured()
isConfigured
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public boolean isRegistered()
isRegistered
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public java.lang.String getName()
getName
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public java.lang.String getDescription()
getDescription
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public int getType()
getType
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public org.apache.excalibur.instrument.manager.InstrumentableDescriptor getInstrumentableDescriptor()
getInstrumentableDescriptor
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public void addCounterInstrumentListener(org.apache.excalibur.instrument.manager.CounterInstrumentListener listener)
addCounterInstrumentListener
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
listener
- CounterInstrumentListener which will start receiving
profile updates.
java.lang.IllegalStateException
- If the Instrument's type is not
InstrumentManager.PROFILE_POINT_TYPE_COUNTER.public void removeCounterInstrumentListener(org.apache.excalibur.instrument.manager.CounterInstrumentListener listener)
removeCounterInstrumentListener
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
listener
- InstrumentListener which will stop receiving profile
events.
java.lang.IllegalStateException
- If the Instrument's type is not
InstrumentManager.PROFILE_POINT_TYPE_COUNTER.public void addValueInstrumentListener(org.apache.excalibur.instrument.manager.ValueInstrumentListener listener)
addValueInstrumentListener
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
listener
- ValueInstrumentListener which will start receiving
profile updates.
java.lang.IllegalStateException
- If the Instrument's type is not
DefaultInstrumentManager.INSTRUMENT_TYPE_VALUE.public void removeValueInstrumentListener(org.apache.excalibur.instrument.manager.ValueInstrumentListener listener)
removeValueInstrumentListener
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
listener
- InstrumentListener which will stop receiving profile
events.
java.lang.IllegalStateException
- If the Instrument's type is not
DefaultInstrumentManager.INSTRUMENT_TYPE_VALUE.public org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor getInstrumentSampleDescriptor(java.lang.String instrumentSampleName) throws org.apache.excalibur.instrument.manager.NoSuchInstrumentSampleException
getInstrumentSampleDescriptor
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
instrumentSampleName
- Name of the InstrumentSample being requested.
org.apache.excalibur.instrument.manager.NoSuchInstrumentSampleException
- If the specified InstrumentSample
does not exist.public org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor createInstrumentSample(java.lang.String sampleDescription, long sampleInterval, int sampleSize, long sampleLease, int sampleType)
createInstrumentSample
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
sampleDescription
- Description to assign to the new Sample.sampleInterval
- Sample interval to use in the new Sample.sampleLease
- Requested lease time for the new Sample in
milliseconds. The InstrumentManager may grant a
lease which is shorter or longer than the requested
period.sampleType
- Type of sample to request. Must be one of the
following: InstrumentManagerClient.INSTRUMENT_SAMPLE_TYPE_COUNTER,
InstrumentManagerClient.INSTRUMENT_SAMPLE_TYPE_MINIMUM,
InstrumentManagerClient.INSTRUMENT_SAMPLE_TYPE_MAXIMUM,
InstrumentManagerClient.INSTRUMENT_SAMPLE_TYPE_MEAN.
org.apache.excalibur.instrument.manager.NoSuchInstrumentSampleException
- If the specified InstrumentSample
does not exist.public org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor[] getInstrumentSampleDescriptors()
getInstrumentSampleDescriptors
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
public int getStateVersion()
getStateVersion
in interface org.apache.excalibur.instrument.manager.InstrumentDescriptor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |