Class RegisterHostMessage
- java.lang.Object
-
- dk.netarkivet.common.distribute.NetarkivetMessage
-
- dk.netarkivet.monitor.distribute.MonitorMessage
-
- dk.netarkivet.monitor.registry.distribute.RegisterHostMessage
-
- All Implemented Interfaces:
Serializable
public class RegisterHostMessage extends MonitorMessage
This type of message is sent to the monitor registry server to register the host for remote JMX monitoring.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
replyOfId
-
-
Constructor Summary
Constructors Constructor Description RegisterHostMessage(String name, int jmxPort, int rmiPort)
Creates a message with the JMX host entry for a host registered to the monitor server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(MonitorMessageVisitor v)
Should be implemented as a part of the visitor pattern.HostEntry
getHostEntry()
Get the host entry for the host registering.-
Methods inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, hasBeenSent, isOk, setNotOk, setNotOk, toString
-
-
-
-
Constructor Detail
-
RegisterHostMessage
public RegisterHostMessage(String name, int jmxPort, int rmiPort)
Creates a message with the JMX host entry for a host registered to the monitor server.- Parameters:
name
- The name of the remote host.jmxPort
- The JMX port allocated on the remote host.rmiPort
- The RMI port allocated on the remote host.- Throws:
ArgumentNotValid
- on null or empty hostname, or negative ports.
-
-
Method Detail
-
accept
public void accept(MonitorMessageVisitor v)
Should be implemented as a part of the visitor pattern. e.g.:public void accept(MonitorMessageVisitor v) { v.visit(this); }
- Specified by:
accept
in classMonitorMessage
- Parameters:
v
- A message visitor.- See Also:
MonitorMessageVisitor
-
getHostEntry
public HostEntry getHostEntry()
Get the host entry for the host registering.- Returns:
- The host entry.
-
-