public final class HostMonitor extends Object
Constructor and Description |
---|
HostMonitor(String hostName,
int registryPort,
User adminUser,
int updateRate)
Instantiates a new
HostMonitor |
Modifier and Type | Method and Description |
---|---|
void |
addServerAddedListener(EventDataListener<ServerMonitor> listener) |
void |
addServerRemovedListener(EventDataListener<ServerMonitor> listener) |
String |
hostName() |
void |
refresh()
Refreshes the servers on this host
|
int |
registryPort() |
Collection<ServerMonitor> |
serverMonitors() |
public HostMonitor(String hostName, int registryPort, User adminUser, int updateRate) throws RemoteException
HostMonitor
hostName
- the name of the host to monitorregistryPort
- the registry portadminUser
- the admin userupdateRate
- the initial statistics update rate in secondsRemoteException
- in case of an exceptionpublic String hostName()
public int registryPort()
public void refresh() throws RemoteException
RemoteException
- in case of an exceptionpublic Collection<ServerMonitor> serverMonitors()
public void addServerAddedListener(EventDataListener<ServerMonitor> listener)
listener
- a listener notified when a server is added to this monitorpublic void addServerRemovedListener(EventDataListener<ServerMonitor> listener)
listener
- a listener notified when a server is removed from this monitor