
public class RemoteMonitoredVm extends AbstractMonitoredVm
This class provides the ability to acquire to the instrumentation buffer of a live, remote target Java Virtual Machine through an RMI server.
interval, pdb, vmid| Constructor and Description |
|---|
RemoteMonitoredVm(RemoteVm rvm,
VmIdentifier vmid,
Timer timer,
int interval)
Create a RemoteMonitoredVm instance.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
clearLastException, findByName, findByPattern, getBytes, getCapacity, getInterval, getLastException, getMonitorStatus, getVmIdentifier, isErrored, setLastExceptionpublic RemoteMonitoredVm(RemoteVm rvm, VmIdentifier vmid, Timer timer, int interval) throws MonitorException
rvm - the proxy to the remote MonitoredVm instance.vmid - the vm identifier specifying the remot target JVMtimer - the timer used to run polling tasksinterval - the sampling intervalMonitorExceptionpublic void attach()
throws MonitorException
MonitorExceptionpublic void detach()
detach in interface MonitoredVmdetach in class AbstractMonitoredVmpublic void sample()
throws RemoteException
The data in the remote instrumentation buffer is copied into a local byte buffer.
RemoteException - Thrown on any communications errors with
the remote system.public RemoteVm getRemoteVm()
public void addVmListener(VmListener l)
addVmListener in interface MonitoredVmaddVmListener in class AbstractMonitoredVml - the VmListener to add.public void removeVmListener(VmListener l)
removeVmListener in interface MonitoredVmremoveVmListener in class AbstractMonitoredVml - the VmListener to be removed.public void setInterval(int newInterval)
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.setInterval in interface MonitoredVmsetInterval in class AbstractMonitoredVmnewInterval - the polling interval in millisecondsCopyright © 2017–2018 earcam. All rights reserved.