MonitoredVm
instances. Concrete implementations of this class
provide methods for managing the communications protocols and provide
for event notification.
HostIdentifier
, VmIdentifier
, MonitoredVm
, HostListener
Modifier and Type | Field and Description |
---|---|
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. |
private static final String | |
private static final String | |
private static final Map | |
private static final String | |
private static final String |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public abstract Set | Returns: Set - the current set of active Java Virtual Machines associated with this MonitoredHost, or the empty set of none.Return the current set of active Java Virtual Machines for this MonitoredHost. |
public abstract void | |
public void | |
public abstract void | |
public HostIdentifier | Returns: HostIdentifier - the resolved HostIdentifier.Return the resolved HostIdentifier for this MonitoredHost. |
public int | Returns: int - the polling interval in milliseconds for this MonitoredHostGet the polling interval. |
public Exception | Returns: Exception - the last exception occurred while polling this MonitoredHost, ornull if no exception
has occurred or the exception has been cleared,Get the last exception encountered while polling this MonitoredHost. |
public static MonitoredHost | Returns: MonitoredHost - the MonitoredHost instance for communicating with the indicated host using the protocol specified in hostIdString.a String representation of a hostIdString)HostIdentifier Factory method to construct MonitoredHost instances to manage
connections to the host indicated by |
public static MonitoredHost | Returns: MonitoredHost - The MonitoredHost object needed to attach to the target Java Virtual Machine.The identifier for the target Java Virtual Machine. vmid)Factory method to construct a MonitoredHost instance to manage the
connection to the Java Virtual Machine indicated by |
public static MonitoredHost | Returns: MonitoredHost - The MonitoredHost object needed to attach to the target host.the identifier for the target host. hostId)Factory method to construct a MonitoredHost instance to manage the
connection to the host indicated by |
public abstract MonitoredVm | Returns: MonitoredVm - the MonitoredVm instance for the target Java Virtual Machine.the VmIdentifier specifying the target Java Virtual Machine. id)Get the MonitoredVm for the given Java Virtual Machine. |
public abstract MonitoredVm | Returns: MonitoredVm - the MonitoredVm instance for the target Java Virtual Machine.the VmIdentifier specifying the target Java Virtual Machine. id, int the sampling interval for the target Java Virtual Machine. interval)Get the MonitoredVm for the given Java Virtual Machine. |
public boolean | Returns: boolean - true if the MonitoredHost instance has experienced an error, or false if it hasn't or if any past error has been cleared.Test if this MonitoredHost is in the errored state. |
public abstract void | |
protected static HostIdentifier | Returns: HostIdentifier - a resolved HostIdentifier.the unresolved 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. |
public void | setInterval(int
the polling interval, in milliseconds interval)Set the polling interval for this MonitoredHost. |
public void | setLastException(Exception
the last exception encountered; lastException)Set the last exception encountered while polling this MonitoredHost. |
hostId | back to summary |
---|---|
protected HostIdentifier hostId The HostIdentifier for this MonitoredHost instance. |
interval | back to summary |
---|---|
protected int interval The polling interval, in milliseconds, for this MonitoredHost instance. |
lastException | back to summary |
---|---|
protected Exception lastException The last Exception encountered while polling this MonitoredHost. |
LOCAL_PROTOCOL | back to summary |
---|---|
private static final String LOCAL_PROTOCOL |
LOCAL_PROTOCOL_PROP_NAME | back to summary |
---|---|
private static final String LOCAL_PROTOCOL_PROP_NAME |
monitoredHosts | back to summary |
---|---|
private static final Map<HostIdentifier, MonitoredHost> monitoredHosts |
REMOTE_PROTOCOL | back to summary |
---|---|
private static final String REMOTE_PROTOCOL |
REMOTE_PROTOCOL_PROP_NAME | back to summary |
---|---|
private static final String REMOTE_PROTOCOL_PROP_NAME |
MonitoredHost | back to summary |
---|---|
public MonitoredHost() |
activeVms | back to summary |
---|---|
public abstract Set Return the current set of active Java Virtual Machines for this
MonitoredHost. The returned Set contains
|
addHostListener | back to summary |
---|---|
public abstract void addHostListener(HostListener listener) throws MonitorException Add a HostListener. The given listener is added to the list of HostListener objects to be notified of MonitoredHost related events.
|
clearLastException | back to summary |
---|---|
public void clearLastException() Clear the last exception. |
detach | back to summary |
---|---|
public abstract void detach(MonitoredVm vm) throws MonitorException Detach from the indicated MonitoredVm.
|
getHostIdentifier | back to summary |
---|---|
public HostIdentifier getHostIdentifier() Return the resolved HostIdentifier for this MonitoredHost.
|
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 MonitoredHost.
|
getMonitoredHost | back to summary |
---|---|
public static MonitoredHost getMonitoredHost(String hostIdString) throws MonitorException, URISyntaxException Factory method to construct MonitoredHost instances to manage
connections to the host indicated by
|
getMonitoredHost | back to summary |
---|---|
public static MonitoredHost getMonitoredHost(VmIdentifier vmid) throws MonitorException Factory method to construct a MonitoredHost instance to manage the
connection to the Java Virtual Machine indicated by
|
getMonitoredHost | back to summary |
---|---|
public static MonitoredHost getMonitoredHost(HostIdentifier hostId) throws MonitorException Factory method to construct a MonitoredHost instance to manage the
connection to the host indicated by
|
getMonitoredVm | back to summary |
---|---|
public abstract MonitoredVm getMonitoredVm(VmIdentifier id) throws MonitorException Get the MonitoredVm for the given Java Virtual Machine. The default sampling interval is used for the MonitoredVm instance.
|
getMonitoredVm | back to summary |
---|---|
public abstract MonitoredVm getMonitoredVm(VmIdentifier id, int interval) throws MonitorException Get the MonitoredVm for the given Java Virtual Machine. The sampling interval is set to the given interval.
|
isErrored | back to summary |
---|---|
public boolean isErrored() 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.
|
removeHostListener | back to summary |
---|---|
public abstract void removeHostListener(HostListener listener) throws MonitorException Remove a HostListener. The given listener is removed from the list of HostListener objects to be notified of MonitoredHost related events.
|
resolveHostId | back to summary |
---|---|
protected static HostIdentifier resolveHostId(HostIdentifier hostId) throws MonitorException Method to resolve unspecified components of the given HostIdentifier by constructing a new HostIdentifier that replaces the unspecified components with the default values.
|
setInterval | back to summary |
---|---|
public void setInterval(int interval) Set the polling interval for this MonitoredHost.
|
setLastException | back to summary |
---|---|
public void setLastException(Exception lastException) Set the last exception encountered while polling this MonitoredHost.
|