public class

RemoteMonitoredVm

extends AbstractMonitoredVm
java.lang.Object
   ↳ sun.jvmstat.perfdata.monitor.AbstractMonitoredVm
     ↳ sun.jvmstat.perfdata.monitor.protocol.rmi.RemoteMonitoredVm

Class Overview

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

This class provides the ability to acquire to the instrumentation buffer of a live, remote target Java Virtual Machine through an RMI server.

Summary

[Expand]
Inherited Fields
From class sun.jvmstat.perfdata.monitor.AbstractMonitoredVm
Public Constructors
RemoteMonitoredVm(RemoteVm rvm, VmIdentifier vmid, Timer timer, int interval)
Create a RemoteMonitoredVm instance.
Public Methods
void addVmListener(VmListener l)
Add a VmListener.
void attach()
Method to attach to the remote MonitoredVm.
void detach()
Detach from target Java Virtual Machine.
RemoteVm getRemoteVm()
Get the proxy to the remote MonitoredVm.
void removeVmListener(VmListener l)
Remove a VmListener.
void sample()
Get a copy of the remote instrumentation buffer.
void setInterval(int newInterval)
Set the polling interval to interval milliseconds.
[Expand]
Inherited Methods
From class sun.jvmstat.perfdata.monitor.AbstractMonitoredVm
From class java.lang.Object
From interface sun.jvmstat.monitor.MonitoredVm
From interface sun.jvmstat.monitor.remote.BufferedMonitoredVm

Public Constructors

public RemoteMonitoredVm (RemoteVm rvm, VmIdentifier vmid, Timer timer, int interval)

Create a RemoteMonitoredVm instance.

Parameters
rvm the proxy to the remote MonitoredVm instance.
vmid the vm identifier specifying the remot target JVM
timer the timer used to run polling tasks
interval the sampling interval

Public Methods

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.

Parameters
l the VmListener to add.

public void attach ()

Method to attach to the remote MonitoredVm.

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.

public RemoteVm getRemoteVm ()

Get the proxy to the remote MonitoredVm.

Returns
  • RemoteVm - the proxy to the remote MonitoredVm.

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.

Parameters
l the VmListener to be removed.

public void sample ()

Get a copy of the remote instrumentation buffer.

The data in the remote instrumentation buffer is copied into a local byte buffer.

Throws
RemoteException Thrown on any communications errors with the remote system.

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.

Parameters
newInterval the polling interval in milliseconds