java.lang.Object | |
↳ | sun.jvmstat.monitor.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.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
hostId | The HostIdentifier for this MonitoredHost instance. | ||||||||||
interval | The polling interval, in milliseconds, for this MonitoredHost instance. | ||||||||||
lastException | The last Exception encountered while polling this MonitoredHost. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the current set of active Java Virtual Machines for this
MonitoredHost.
| |||||||||||
Add a HostListener.
| |||||||||||
Clear the last exception.
| |||||||||||
Detach from the indicated MonitoredVm.
| |||||||||||
Return the resolved HostIdentifier for this MonitoredHost.
| |||||||||||
Get the polling interval.
| |||||||||||
Get the last exception encountered while polling this MonitoredHost.
| |||||||||||
Factory method to construct a MonitoredHost instance to manage the
connection to the host indicated by hostId.
| |||||||||||
Factory method to construct MonitoredHost instances to manage
connections to the host indicated by hostIdString
| |||||||||||
Factory method to construct a MonitoredHost instance to manage the
connection to the Java Virtual Machine indicated by vmid.
| |||||||||||
Get the MonitoredVm for the given Java Virtual Machine.
| |||||||||||
Get the MonitoredVm for the given Java Virtual Machine.
| |||||||||||
Test if this MonitoredHost is in the errored state.
| |||||||||||
Remove a HostListener.
| |||||||||||
Set the polling interval for this MonitoredHost.
| |||||||||||
Set the last exception encountered while polling this MonitoredHost.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Method to resolve unspecified components of the given HostIdentifier
by constructing a new HostIdentifier that replaces the unspecified
components with the default values.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The polling interval, in milliseconds, for this MonitoredHost instance.
Return the current set of active Java Virtual Machines for this
MonitoredHost. The returned Set contains Integer
instances
holding the local virtual machine identifier, or lvmid
for each instrumented Java Virtual Machine currently available.
MonitorException | Thrown if monitoring errors occur. |
---|
Add a HostListener. The given listener is added to the list of HostListener objects to be notified of MonitoredHost related events.
listener | the HostListener to add. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|
Clear the last exception.
Detach from the indicated MonitoredVm.
vm | the monitored Java Virtual Machine. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|
Return the resolved HostIdentifier for this MonitoredHost.
Get the polling interval.
Get the last exception encountered while polling this MonitoredHost.
Factory method to construct a MonitoredHost instance to manage the connection to the host indicated by hostId.
hostId | the identifier for the target host. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|
Factory method to construct MonitoredHost instances to manage connections to the host indicated by hostIdString
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. |
Factory method to construct a MonitoredHost instance to manage the connection to the Java Virtual Machine indicated by vmid. This method provide a convenient short cut for attaching to a specific instrumented Java Virtual Machine. The information in the VmIdentifier is used to construct a corresponding HostIdentifier, which in turn is used to create the MonitoredHost instance.
vmid | The identifier for the target Java Virtual Machine. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|
Get the MonitoredVm for the given Java Virtual Machine. The sampling interval is set to the given interval.
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. |
---|
Get the MonitoredVm for the given Java Virtual Machine. The default sampling interval is used for the MonitoredVm instance.
id | the VmIdentifier specifying the target Java Virtual Machine. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|
Test if this MonitoredHost is in the errored state. If this method returns true, then the Exception returned by getLastException() indicates the Exception that caused the error condition.
Remove a HostListener. The given listener is removed from the list of HostListener objects to be notified of MonitoredHost related events.
listener | the HostListener to add. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|
Set the polling interval for this MonitoredHost.
interval | the polling interval, in milliseconds |
---|
Set the last exception encountered while polling this MonitoredHost.
lastException | the last exception encountered; |
---|
Method to resolve unspecified components of the given HostIdentifier by constructing a new HostIdentifier that replaces the unspecified components with the default values.
hostId | the unresolved HostIdentifier. |
---|
MonitorException | Thrown if monitoring errors occur. |
---|