Jvmstat

sun.jvmstat.perfdata.monitor.protocol.local
Class LocalMonitoredVm

java.lang.Object
  extended by sun.jvmstat.perfdata.monitor.AbstractMonitoredVm
      extended by sun.jvmstat.perfdata.monitor.protocol.local.LocalMonitoredVm
All Implemented Interfaces:
MonitoredVm, BufferedMonitoredVm

public class LocalMonitoredVm
extends AbstractMonitoredVm

Concrete implementation of the AbstractMonitoredVm class for the local: protocol for the HotSpot PerfData monitoring implementation.

This class provides the ability to attach to the instrumentation buffer of a live target Java Virtual Machine through a HotSpot specific attach mechanism.

Since:
1.5

Field Summary
 
Fields inherited from class sun.jvmstat.perfdata.monitor.AbstractMonitoredVm
interval, pdb, vmid
 
Constructor Summary
LocalMonitoredVm(VmIdentifier vmid, int interval)
          Create a LocalMonitoredVm instance.
 
Method Summary
 void addVmListener(VmListener l)
          Add a VmListener.
 void detach()
          Detach from target Java Virtual Machine.
 void removeVmListener(VmListener l)
          Remove a VmListener.
 void setInterval(int newInterval)
          Set the polling interval to interval milliseconds.
 
Methods inherited from class sun.jvmstat.perfdata.monitor.AbstractMonitoredVm
clearLastException, findByName, findByPattern, getBytes, getCapacity, getInterval, getLastException, getMonitorStatus, getVmIdentifier, isErrored, setLastException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalMonitoredVm

public LocalMonitoredVm(VmIdentifier vmid,
                        int interval)
                 throws MonitorException
Create a LocalMonitoredVm instance.

Parameters:
vmid - the vm identifier specifying the target JVM
interval - the sampling interval
Throws:
MonitorException
Method Detail

detach

public void detach()
Detach from target Java Virtual Machine. After calling this method, updates of the instrumentation data values may be halted. All event notifications are halted. Further interactions with this object should be avoided..

Specified by:
detach in interface MonitoredVm
Overrides:
detach in class AbstractMonitoredVm

addVmListener

public void addVmListener(VmListener l)
Add a VmListener. The given listener is added to the list of VmListener objects to be notified of MonitoredVm related events..

Specified by:
addVmListener in interface MonitoredVm
Specified by:
addVmListener in class AbstractMonitoredVm
Parameters:
l - the VmListener to add.

removeVmListener

public void removeVmListener(VmListener l)
Remove a VmListener. The given listener is removed from the list of VmListener objects to be notified of MonitoredVm related events..

Specified by:
removeVmListener in interface MonitoredVm
Specified by:
removeVmListener in class AbstractMonitoredVm
Parameters:
l - the VmListener to be removed.

setInterval

public void setInterval(int newInterval)
Set the polling interval to interval milliseconds. Polling based monitoring implementations need to refresh the instrumentation data on a periodic basis. This interface allows the interval to override the implementation specific default interval..

Specified by:
setInterval in interface MonitoredVm
Overrides:
setInterval in class AbstractMonitoredVm
Parameters:
newInterval - the polling interval in milliseconds

Jvmstat