|
Jvmstat | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MonitoredVm
Interface for interacting with a monitorable Java Virtual Machine. The MonitoredVm interface provides methods for discovery of exported instrumentation, for attaching event listeners, and for overall maintenance of the connection to the target.
Method Summary | |
---|---|
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 |
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. |
Method Detail |
---|
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 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.Pattern
void 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.
|
Jvmstat | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |