Modifier and Type | Method and Description |
---|---|
public void | |
public void | |
public void | |
public Monitor | Returns: Monitor - theMonitor object that can be used to
monitor the named instrumentation object, or
null if the named object doesn't exist.the name of the Instrumentation object to find. name)Find a named Instrumentation object. |
public List | Returns: List<Monitor> - a List of 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.a string containing a pattern as described in
patternString)java. .Find all Instrumentation objects with names matching the given pattern. |
public int | |
public Exception | Returns: Exception - the last exception that occurred during polling ornull if no error condition exists.Get the last exception encountered while polling this MonitoredVm. |
public VmIdentifier | Returns: VmIdentifier - the fully resolved Vm identifier associated with this MonitoredVm.Get the VmIdentifier associated with this MonitoredVm |
public boolean | Returns: boolean - true if the instance has a non-null error condition set, false otherwise.Test if this MonitoredVm is in the errored state. |
public void | |
public void | setInterval(int
the polling interval in milliseconds interval)Set the polling interval to |
public void | setLastException(Exception
the exception to record. cause)Set the last exception encountered while polling this MonitoredVm. |
addVmListener | back to summary |
---|---|
public void addVmListener(VmListener listener) throws MonitorException Add a VmListener. The given listener is added to the list of VmListener objects to be notified of MonitoredVm related events.
|
clearLastException | back to summary |
---|---|
public void clearLastException() Clear the last exception. Calling this method will clear the errored state of this MonitoredVm. However, there is no guarantee that clearing the the errored state return the asynchronous polling task to an operational state. |
detach | back to summary |
---|---|
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. |
findByName | back to summary |
---|---|
public Monitor findByName(String name) throws MonitorException Find a named Instrumentation object.
This method will look for the named instrumentation object in the
instrumentation exported by this Java Virtual Machine. If an
instrumentation object with the given name exists, a Monitor interface
to that object will be return. Otherwise, the method returns
|
findByPattern | back to summary |
---|---|
public List Find all Instrumentation objects with names matching the given pattern.
This method returns a
|
getInterval | back to summary |
---|---|
public int getInterval() Get the polling interval.
|
getLastException | back to summary |
---|---|
public Exception getLastException() Get the last exception encountered while polling this MonitoredVm.
Returns the last exception observed by the implementation dependent
polling task or
|
getVmIdentifier | back to summary |
---|---|
public VmIdentifier getVmIdentifier() Get the VmIdentifier associated with this MonitoredVm
|
isErrored | back to summary |
---|---|
public boolean isErrored() Test if this MonitoredVm is in the errored state.
The errored state exists only if an error was reported with
call to
|
removeVmListener | back to summary |
---|---|
public void removeVmListener(VmListener listener) throws MonitorException Remove a VmListener. The given listener is removed from the list of VmListener objects to be notified of MonitoredVm related events.
|
setInterval | back to summary |
---|---|
public void setInterval(int interval) Set the polling interval to
|
setLastException | back to summary |
---|---|
public void setLastException(Exception cause) Set the last exception encountered while polling this MonitoredVm. Polling implementations may choose to poll asynchronously. This method allows an asynchronous task to communicate any polling related exceptions with the application. When a non-null exception is reported through this interface, the MonitoredVm instance is considered to be in the errored state. |