|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Because some components using Instruments will be created in large numbers a way is needed to collect data from the instances of all instances of a component class without maintaining references to Instruments of each instance. An Instrument Manager can do this by making use of Instrument Proxies. Each Instrument is assigned a proxy when it is registered with the manager, then all communication is made through the proxy The Instrument interface must by implemented by any object wishing to act as an instrument used by the instrument manager.
Method Summary | |
void |
increment(int count)
Increments the Instrument by a specified count. |
boolean |
isActive()
Used by classes being profiles 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. |
Method Detail |
public boolean isActive()
public void increment(int count)
This method may throw an IllegalStateException if the proxy is not meant to handle calls to increment.
count
- A positive integer to increment the counter by.public void setValue(int value)
This method may throw an IllegalStateException if the proxy is not meant to handle calls to setValue.
value
- The new value for the Instrument.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |