public class MonitoredHostProvider extends MonitoredHost
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_POLLING_INTERVAL
The default polling interval.
|
hostId, interval, lastException| Constructor and Description |
|---|
MonitoredHostProvider(HostIdentifier hostId)
Create a MonitoredHostProvider instance using the given HostIdentifier.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Integer> |
activeVms()
Return the current set of active Java Virtual Machines for this
MonitoredHost.
|
void |
addHostListener(HostListener listener)
Add a HostListener.
|
void |
detach(MonitoredVm vm)
Detach from the indicated MonitoredVm.
|
MonitoredVm |
getMonitoredVm(VmIdentifier vmid)
Get the MonitoredVm for the given Java Virtual Machine.
|
MonitoredVm |
getMonitoredVm(VmIdentifier vmid,
int interval)
Get the MonitoredVm for the given Java Virtual Machine.
|
void |
removeHostListener(HostListener listener)
Remove a HostListener.
|
clearLastException, getHostIdentifier, getInterval, getLastException, getMonitoredHost, getMonitoredHost, getMonitoredHost, isErrored, resolveHostId, setInterval, setLastExceptionpublic static final int DEFAULT_POLLING_INTERVAL
public MonitoredHostProvider(HostIdentifier hostId)
hostId - the host identifier for this MonitoredHostpublic MonitoredVm getMonitoredVm(VmIdentifier vmid) throws MonitorException
getMonitoredVm in class MonitoredHostvmid - the VmIdentifier specifying the target Java Virtual Machine.MonitorException - Thrown if monitoring errors occur.public MonitoredVm getMonitoredVm(VmIdentifier vmid, int interval) throws MonitorException
Note - the file: protocol silently ignores the interval parameter.
getMonitoredVm in class MonitoredHostvmid - the VmIdentifier specifying the target Java Virtual Machine.interval - the sampling interval for the target Java Virtual Machine.MonitorException - Thrown if monitoring errors occur.public void detach(MonitoredVm vm)
detach in class MonitoredHostvm - the monitored Java Virtual Machine.public void addHostListener(HostListener listener)
Note - the file: protocol currenly does not support registration or notification of event listeners. This method silently ignores the add request.
addHostListener in class MonitoredHostlistener - the HostListener to add.public void removeHostListener(HostListener listener)
Note - the file: protocol currenly does not support registration or notification of event listeners. This method silently ignores the remove request.
removeHostListener in class MonitoredHostlistener - the HostListener to add.public Set<Integer> activeVms()
Integer instances
holding the local virtual machine identifier, or lvmid
for each instrumented Java Virtual Machine currently available..
Note - the file: protocol currently does not support the notion of tracking active or inactive Java Virtual Machines. This method currently returns an empty set.
activeVms in class MonitoredHostCopyright © 2017–2018 earcam. All rights reserved.