|
Jvmstat | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsun.jvmstat.monitor.MonitoredHost
public abstract class MonitoredHost
An abstraction for a host that contains instrumented Java Virtual
Machines. The class provides abstract factory methods for creating
concrete instances of this class and factory methods for creating
MonitoredVm
instances. Concrete implementations of this class
provide methods for managing the communications protocols and provide
for event notification.
HostIdentifier
,
VmIdentifier
,
MonitoredVm
,
HostListener
Field Summary | |
---|---|
protected HostIdentifier |
hostId
The HostIdentifier for this MonitoredHost instance. |
protected int |
interval
The polling interval, in milliseconds, for this MonitoredHost instance. |
protected Exception |
lastException
The last Exception encountered while polling this MonitoredHost. |
Constructor Summary | |
---|---|
MonitoredHost()
|
Method Summary | |
---|---|
abstract Set |
activeVms()
Return the current set of active Java Virtual Machines for this MonitoredHost. |
abstract void |
addHostListener(HostListener listener)
Add a HostListener. |
void |
clearLastException()
Clear the last exception. |
abstract void |
detach(MonitoredVm vm)
Detach from the indicated MonitoredVm. |
HostIdentifier |
getHostIdentifier()
Return the resolved HostIdentifier for this MonitoredHost. |
int |
getInterval()
Get the polling interval. |
Exception |
getLastException()
Get the last exception encountered while polling this MonitoredHost. |
static MonitoredHost |
getMonitoredHost(HostIdentifier hostId)
Factory method to construct a MonitoredHost instance to manage the connection to the host indicated by hostId. |
static MonitoredHost |
getMonitoredHost(String hostIdString)
Factory method to construct MonitoredHost instances to manage connections to the host indicated by hostIdString |
static MonitoredHost |
getMonitoredHost(VmIdentifier vmid)
Factory method to construct a MonitoredHost instance to manage the connection to the Java Virtual Machine indicated by vmid. |
abstract MonitoredVm |
getMonitoredVm(VmIdentifier id)
Get the MonitoredVm for the given Java Virtual Machine. |
abstract MonitoredVm |
getMonitoredVm(VmIdentifier id,
int interval)
Get the MonitoredVm for the given Java Virtual Machine. |
boolean |
isErrored()
Test if this MonitoredHost is in the errored state. |
abstract void |
removeHostListener(HostListener listener)
Remove a HostListener. |
protected static HostIdentifier |
resolveHostId(HostIdentifier hostId)
Method to resolve unspecified components of the given HostIdentifier by constructing a new HostIdentifier that replaces the unspecified components with the default values. |
void |
setInterval(int interval)
Set the polling interval for this MonitoredHost. |
void |
setLastException(Exception lastException)
Set the last exception encountered while polling this MonitoredHost. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HostIdentifier hostId
protected int interval
protected Exception lastException
Constructor Detail |
---|
public MonitoredHost()
Method Detail |
---|
public static MonitoredHost getMonitoredHost(String hostIdString) throws MonitorException, URISyntaxException
hostIdString
- a String representation of a HostIdentifier
MonitorException
- Thrown if monitoring errors occur.
URISyntaxException
- Thrown when the hostIdString is poorly
formed. This exception may get encapsulated
into MonitorException in a future revision.public static MonitoredHost getMonitoredHost(VmIdentifier vmid) throws MonitorException
vmid
- The identifier for the target Java Virtual Machine.
MonitorException
- Thrown if monitoring errors occur.public static MonitoredHost getMonitoredHost(HostIdentifier hostId) throws MonitorException
hostId
- the identifier for the target host.
MonitorException
- Thrown if monitoring errors occur.protected static HostIdentifier resolveHostId(HostIdentifier hostId) throws MonitorException
hostId
- the unresolved HostIdentifier.
MonitorException
- Thrown if monitoring errors occur.public HostIdentifier getHostIdentifier()
public void setInterval(int interval)
interval
- the polling interval, in millisecondspublic int getInterval()
public void setLastException(Exception lastException)
lastException
- the last exception encountered;public Exception getLastException()
public void clearLastException()
public boolean isErrored()
public abstract MonitoredVm getMonitoredVm(VmIdentifier id) throws MonitorException
id
- the VmIdentifier specifying the target Java Virtual Machine.
MonitorException
- Thrown if monitoring errors occur.public abstract MonitoredVm getMonitoredVm(VmIdentifier id, int interval) throws MonitorException
id
- 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 abstract void detach(MonitoredVm vm) throws MonitorException
vm
- the monitored Java Virtual Machine.
MonitorException
- Thrown if monitoring errors occur.public abstract void addHostListener(HostListener listener) throws MonitorException
listener
- the HostListener to add.
MonitorException
- Thrown if monitoring errors occur.public abstract void removeHostListener(HostListener listener) throws MonitorException
listener
- the HostListener to add.
MonitorException
- Thrown if monitoring errors occur.public abstract Set activeVms() throws MonitorException
Integer
instances
holding the local virtual machine identifier, or lvmid
for each instrumented Java Virtual Machine currently available.
MonitorException
- Thrown if monitoring errors occur.
|
Jvmstat | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |