
public interface MonitoredVm
| Modifier and Type | Method and Description |
|---|---|
void |
addVmListener(VmListener listener)
Add a VmListener.
|
void |
clearLastException()
Clear the last exception.
|
void |
detach()
Detach from target Java Virtual Machine.
|
Monitor |
findByName(String name)
Find a named Instrumentation object.
|
List<Monitor> |
findByPattern(String patternString)
Find all Instrumentation objects with names matching the given pattern.
|
int |
getInterval()
Get the polling interval.
|
Exception |
getLastException()
Get the last exception encountered while polling this MonitoredVm.
|
VmIdentifier |
getVmIdentifier()
Get the VmIdentifier associated with this MonitoredVm
|
boolean |
isErrored()
Test if this MonitoredVm is in the errored state.
|
void |
removeVmListener(VmListener listener)
Remove a VmListener.
|
void |
setInterval(int interval)
Set the polling interval to
interval milliseconds. |
void |
setLastException(Exception cause)
Set the last exception encountered while polling this MonitoredVm.
|
VmIdentifier getVmIdentifier()
Monitor findByName(String name) throws MonitorException
name - the name of the Instrumentation object to find.Monitor object that can be used to
monitor the the named instrumentation object, or
null if the named object doesn't exist.MonitorException - Thrown if an error occurs while communicating
with the target Java Virtual Machine.List<Monitor> findByPattern(String patternString) throws MonitorException
List of Monitor objects such that
the name of each object matches the given pattern.patternString - a string containing a pattern as described in
Pattern.Monitor objects that can be used to
monitor the instrumentation objects whose names match
the given pattern. If no instrumentation objects have`
names matching the given pattern, then an empty List
is returned.MonitorException - Thrown if an error occurs while communicating
with the target Java Virtual Machine.Patternvoid detach()
void setInterval(int interval)
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.interval - the polling interval in millisecondsint getInterval()
setInterval(int)void setLastException(Exception cause)
cause - the exception to record.isErrored()Exception getLastException()
isErrored(),
setLastException(java.lang.Exception)void clearLastException()
boolean isErrored()
setLastException(java.lang.Exception) and only if the parameter to
that call was non-null and no subsequent calls are made to
clearLastException().setLastException(java.lang.Exception),
getLastException()void addVmListener(VmListener listener) throws MonitorException
listener - the VmListener to add.MonitorException - Thrown if any problems occur while attempting
to add this listener.void removeVmListener(VmListener listener) throws MonitorException
listener - the VmListener to be removed.MonitorException - Thrown if any problems occur while attempting
to remove this listener.Copyright © 2017–2018 earcam. All rights reserved.