Keel 2.1RC2

org.apache.excalibur.instrument.manager
Interface InstrumentDescriptorLocal

All Superinterfaces:
InstrumentDescriptor
All Known Implementing Classes:
InstrumentDescriptorLocalImpl

public interface InstrumentDescriptorLocal
extends InstrumentDescriptor

Describes a Instrument and acts as a Proxy to protect the original Instrument. Methods defined by the Local interface should only be accessed from within the same JVM for performance reasons.

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

Method Summary
 void addCounterInstrumentListener(CounterInstrumentListener listener)
          Adds a CounterInstrumentListener to the list of listeners which will receive updates of the value of the Instrument.
 void addValueInstrumentListener(ValueInstrumentListener listener)
          Adds a ValueInstrumentListener to the list of listeners which will receive updates of the value of the Instrument.
 InstrumentSampleDescriptorLocal createInstrumentSampleLocal(java.lang.String sampleDescription, long sampleInterval, int sampleSize, long sampleLease, int sampleType)
          Returns a InstrumentSampleDescriptorLocal based on its name.
 InstrumentableDescriptorLocal getInstrumentableDescriptorLocal()
          Returns a reference to the descriptor of the Instrumentable of the instrument.
 InstrumentSampleDescriptorLocal getInstrumentSampleDescriptorLocal(java.lang.String instrumentSampleName)
          Returns a InstrumentSampleDescriptorLocal based on its name.
 InstrumentSampleDescriptorLocal[] getInstrumentSampleDescriptorLocals()
          Returns an array of Descriptors for the InstrumentSamples configured for this Instrument.
 void removeCounterInstrumentListener(CounterInstrumentListener listener)
          Removes a InstrumentListener from the list of listeners which will receive profile events.
 void removeValueInstrumentListener(ValueInstrumentListener listener)
          Removes a InstrumentListener from the list of listeners which will receive profile events.
 
Methods inherited from interface org.apache.excalibur.instrument.manager.interfaces.InstrumentDescriptor
createInstrumentSample, getDescription, getInstrumentableDescriptor, getInstrumentSampleDescriptor, getInstrumentSampleDescriptors, getName, getStateVersion, getType, isConfigured, isRegistered
 

Method Detail

getInstrumentableDescriptorLocal

public InstrumentableDescriptorLocal getInstrumentableDescriptorLocal()
Returns a reference to the descriptor of the Instrumentable of the instrument.

Returns:
A reference to the descriptor of the Instrumentable of the instrument.

addCounterInstrumentListener

public void addCounterInstrumentListener(CounterInstrumentListener listener)
Adds a CounterInstrumentListener to the list of listeners which will receive updates of the value of the Instrument.

Parameters:
listener - CounterInstrumentListener which will start receiving profile updates.
Throws:
java.lang.IllegalStateException - If the Instrument's type is not InstrumentManager.PROFILE_POINT_TYPE_COUNTER.

removeCounterInstrumentListener

public void removeCounterInstrumentListener(CounterInstrumentListener listener)
Removes a InstrumentListener from the list of listeners which will receive profile events.

Parameters:
listener - InstrumentListener which will stop receiving profile events.
Throws:
java.lang.IllegalStateException - If the Instrument's type is not InstrumentManager.PROFILE_POINT_TYPE_COUNTER.

addValueInstrumentListener

public void addValueInstrumentListener(ValueInstrumentListener listener)
Adds a ValueInstrumentListener to the list of listeners which will receive updates of the value of the Instrument.

Parameters:
listener - ValueInstrumentListener which will start receiving profile updates.
Throws:
java.lang.IllegalStateException - If the Instrument's type is not InstrumentManager.PROFILE_POINT_TYPE_VALUE.

removeValueInstrumentListener

public void removeValueInstrumentListener(ValueInstrumentListener listener)
Removes a InstrumentListener from the list of listeners which will receive profile events.

Parameters:
listener - InstrumentListener which will stop receiving profile events.
Throws:
java.lang.IllegalStateException - If the Instrument's type is not InstrumentManager.PROFILE_POINT_TYPE_VALUE.

getInstrumentSampleDescriptorLocal

public InstrumentSampleDescriptorLocal getInstrumentSampleDescriptorLocal(java.lang.String instrumentSampleName)
                                                                   throws NoSuchInstrumentSampleException
Returns a InstrumentSampleDescriptorLocal based on its name.

Parameters:
instrumentSampleName - Name of the InstrumentSample being requested.
Returns:
A Descriptor of the requested InstrumentSample.
Throws:
NoSuchInstrumentSampleException - If the specified InstrumentSample does not exist.

createInstrumentSampleLocal

public InstrumentSampleDescriptorLocal createInstrumentSampleLocal(java.lang.String sampleDescription,
                                                                   long sampleInterval,
                                                                   int sampleSize,
                                                                   long sampleLease,
                                                                   int sampleType)
Returns a InstrumentSampleDescriptorLocal based on its name. If the requested sample is invalid in any way, then an expired Descriptor will be returned.

Parameters:
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.
Returns:
A Descriptor of the requested InstrumentSample.
Throws:
NoSuchInstrumentSampleException - If the specified InstrumentSample does not exist.

getInstrumentSampleDescriptorLocals

public InstrumentSampleDescriptorLocal[] getInstrumentSampleDescriptorLocals()
Returns an array of Descriptors for the InstrumentSamples configured for this Instrument.

Returns:
An array of Descriptors for the InstrumentSamples configured for this Instrument.

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.