sun.jvmstat.perfdata.monitor
Class PerfStringConstantMonitor
java.lang.Object
sun.jvmstat.monitor.AbstractMonitor
sun.jvmstat.perfdata.monitor.PerfByteArrayMonitor
sun.jvmstat.perfdata.monitor.PerfStringMonitor
sun.jvmstat.perfdata.monitor.PerfStringConstantMonitor
- All Implemented Interfaces:
- ByteArrayMonitor, Monitor, StringMonitor
public class PerfStringConstantMonitor
- extends PerfStringMonitor
Class for monitoring a constant PerfData String instrument. The
value associated with a constant string instrument is fixed at
the string instrument's creation time. Its value and length never
change.
- Since:
- 1.5
Constructor Summary |
PerfStringConstantMonitor(String name,
boolean supported,
ByteBuffer bb)
Constructor to create a StringMonitor object for the constant string
instrument object represented by the data in the given buffer. |
Method Summary |
Object |
getValue()
Return an Object that encapsulates this instrumentation object's
current data value. |
String |
stringValue()
Return the current value of the StringInstrument as a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerfStringConstantMonitor
public PerfStringConstantMonitor(String name,
boolean supported,
ByteBuffer bb)
- Constructor to create a StringMonitor object for the constant string
instrument object represented by the data in the given buffer.
- Parameters:
name
- the name of the instrumentation objectsupported
- support level indicatorbb
- the buffer containing the string instrument data
getValue
public Object getValue()
- Return an Object that encapsulates this instrumentation object's
current data value.
The object returned contains a byte[] with a copy of the current
elements of the ByteArrayInstrument.
The object returned contains a String with a copy of the current
value of the StringInstrument.
- Specified by:
getValue
in interface Monitor
- Overrides:
getValue
in class PerfStringMonitor
- Returns:
- Object - a copy of the current value of the StringInstrument.
The return value is guaranteed to be of type String.
stringValue
public String stringValue()
- Return the current value of the StringInstrument as a String.
- Specified by:
stringValue
in interface StringMonitor
- Overrides:
stringValue
in class PerfStringMonitor
- Returns:
- String - a copy of the current value of the StringInstrument.