dk.netarkivet.monitor.registry.distribute
Class RegisterHostMessage

java.lang.Object
  extended by dk.netarkivet.common.distribute.NetarkivetMessage
      extended by dk.netarkivet.monitor.distribute.MonitorMessage
          extended by dk.netarkivet.monitor.registry.distribute.RegisterHostMessage
All Implemented Interfaces:
java.io.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
(package private)  HostEntry hostEntry
          The HostEntry to register.
 
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
replyOfId
 
Constructor Summary
RegisterHostMessage(java.lang.String name, int jmxPort, int rmiPort)
          Creates a message with the JMX host entry for a host registered to the monitor server.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hostEntry

HostEntry hostEntry
The HostEntry to register.

Constructor Detail

RegisterHostMessage

public RegisterHostMessage(java.lang.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 class MonitorMessage
Parameters:
v - A message visitor.
See Also:
MonitorMessageVisitor

getHostEntry

public HostEntry getHostEntry()
Get the host entry for the host registering.

Returns:
The host entry.