Package dk.netarkivet.monitor.distribute
Class JMSMonitorRegistryClient
- java.lang.Object
-
- dk.netarkivet.monitor.distribute.JMSMonitorRegistryClient
-
- All Implemented Interfaces:
MonitorRegistryClient
,CleanupIF
public final class JMSMonitorRegistryClient extends Object implements MonitorRegistryClient, CleanupIF
The monitor registry client sends messages with JMS to register the host for JMX monitoring.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
Used to clean up a class from within a shutdown hook.static JMSMonitorRegistryClient
getInstance()
Get the registry client singleton.void
register(String localHostName, int jmxPort, int rmiPort)
Register this host for monitoring.
-
-
-
Method Detail
-
getInstance
public static JMSMonitorRegistryClient getInstance()
Get the registry client singleton.- Returns:
- The registry client.
-
register
public void register(String localHostName, int jmxPort, int rmiPort)
Register this host for monitoring. Once this method is called it will reregister for monitoring every minute, to ensure the scheduling is done. If called again, it will restart the timer that registers the host.- Specified by:
register
in interfaceMonitorRegistryClient
- Parameters:
localHostName
- The name of the host.jmxPort
- The port for JMX connections to the host.rmiPort
- The port for RMI connections for JMX communication.- Throws:
ArgumentNotValid
- on null or empty localHostName, or negative port numbers.
-
-