org.opends.server.replication.protocol
Class RoutableMessage

java.lang.Object
  extended by org.opends.server.replication.protocol.ReplicationMessage
      extended by org.opends.server.replication.protocol.RoutableMessage
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DoneMessage, EntryMessage, ErrorMessage, InitializeRequestMessage, InitializeTargetMessage, MonitorMessage, MonitorRequestMessage

public abstract class RoutableMessage
extends ReplicationMessage
implements java.io.Serializable

This is an abstract class of messages of the replication protocol for message that needs to contain information about the server that send them and the destination servers to whitch they should be sent.

See Also:
Serialized Form

Field Summary
static short ALL_SERVERS
          Specifies all servers in the replication domain.
protected  short destination
          The destination server or servers of this message.
protected  short senderID
          The serverID of the server that sends this message.
static short THE_CLOSEST_SERVER
          Inside a topology of servers in the same domain, it specifies the server that is the "closest" to the sender.
static short UNKNOWN_SERVER
          Specifies that no server is identified.
 
Constructor Summary
RoutableMessage()
          Creates a routable message.
RoutableMessage(short senderID, short destination)
          Creates a routable message.
 
Method Summary
 short getDestination()
          Get the destination.
 short getsenderID()
          Get the server ID of the server that sent this message.
 java.lang.String toString()
          Returns a string representation of the message.
 
Methods inherited from class org.opends.server.replication.protocol.ReplicationMessage
addByteArray, generateMsg, getBytes, getNextLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_SERVER

public static final short UNKNOWN_SERVER
Specifies that no server is identified.

See Also:
Constant Field Values

ALL_SERVERS

public static final short ALL_SERVERS
Specifies all servers in the replication domain.

See Also:
Constant Field Values

THE_CLOSEST_SERVER

public static final short THE_CLOSEST_SERVER
Inside a topology of servers in the same domain, it specifies the server that is the "closest" to the sender.

See Also:
Constant Field Values

destination

protected short destination
The destination server or servers of this message.


senderID

protected short senderID
The serverID of the server that sends this message.

Constructor Detail

RoutableMessage

public RoutableMessage(short senderID,
                       short destination)
Creates a routable message.

Parameters:
senderID - replication server id
destination - replication server id

RoutableMessage

public RoutableMessage()
Creates a routable message.

Method Detail

getDestination

public short getDestination()
Get the destination.

Returns:
the destination

getsenderID

public short getsenderID()
Get the server ID of the server that sent this message.

Returns:
the server id

toString

public java.lang.String toString()
Returns a string representation of the message.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this message.