Jvmstat

sun.jvmstat.perfdata.monitor
Class PerfStringMonitor

java.lang.Object
  extended by sun.jvmstat.monitor.AbstractMonitor
      extended by sun.jvmstat.perfdata.monitor.PerfByteArrayMonitor
          extended by sun.jvmstat.perfdata.monitor.PerfStringMonitor
All Implemented Interfaces:
ByteArrayMonitor, Monitor, StringMonitor
Direct Known Subclasses:
PerfStringConstantMonitor, PerfStringVariableMonitor

public class PerfStringMonitor
extends PerfByteArrayMonitor
implements StringMonitor

Class for monitoring a PerfData String instrument.

Since:
1.5

Field Summary
 
Fields inherited from class sun.jvmstat.monitor.AbstractMonitor
name, supported, units, variability, vectorLength
 
Constructor Summary
PerfStringMonitor(String name, sun.management.counter.Variability v, boolean supported, ByteBuffer bb)
          Constructor to create a StringMonitor object for the string instrument represented by the data in the given buffer.
PerfStringMonitor(String name, sun.management.counter.Variability v, boolean supported, ByteBuffer bb, int maxLength)
          Constructor to create a StringMonitor object for the string instrument 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 sun.jvmstat.perfdata.monitor.PerfByteArrayMonitor
byteArrayValue, byteAt, getMaximumLength
 
Methods inherited from class sun.jvmstat.monitor.AbstractMonitor
getBaseName, getName, getUnits, getVariability, getVectorLength, isSupported, isVector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sun.jvmstat.monitor.Monitor
getBaseName, getName, getUnits, getVariability, getVectorLength, isSupported, isVector
 

Constructor Detail

PerfStringMonitor

public PerfStringMonitor(String name,
                         sun.management.counter.Variability v,
                         boolean supported,
                         ByteBuffer bb)
Constructor to create a StringMonitor object for the string instrument represented by the data in the given buffer.

Parameters:
name - the name of the string instrument
v - the variability attribute
supported - support level indicator
bb - the buffer containing the string instrument data.

PerfStringMonitor

public PerfStringMonitor(String name,
                         sun.management.counter.Variability v,
                         boolean supported,
                         ByteBuffer bb,
                         int maxLength)
Constructor to create a StringMonitor object for the string instrument represented by the data in the given buffer.

Parameters:
name - the name of the string instrument
v - the variability attribute
supported - support level indicator
bb - the buffer containing the string instrument data.
maxLength - the maximum length of the string data.
Method Detail

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 PerfByteArrayMonitor
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
Returns:
String - a copy of the current value of the StringInstrument.

Jvmstat