org.opends.server.replication.protocol
Class InitializeRequestMessage

java.lang.Object
  extended by org.opends.server.replication.protocol.ReplicationMessage
      extended by org.opends.server.replication.protocol.RoutableMessage
          extended by org.opends.server.replication.protocol.InitializeRequestMessage
All Implemented Interfaces:
java.io.Serializable

public class InitializeRequestMessage
extends RoutableMessage
implements java.io.Serializable

This message is part of the replication protocol. This message is sent by a server to another server in order to request this other server to do an export to the server sender of this message.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opends.server.replication.protocol.RoutableMessage
ALL_SERVERS, destination, senderID, THE_CLOSEST_SERVER, UNKNOWN_SERVER
 
Constructor Summary
InitializeRequestMessage(byte[] in)
          Creates a new InitializeRequestMessage by decoding the provided byte array.
InitializeRequestMessage(DN baseDn, short senderID, short destination)
          Creates a InitializeRequestMessage message.
 
Method Summary
 DN getBaseDn()
          Get the base DN from this InitializeRequestMessage.
 byte[] getBytes()
          Return the byte[] representation of this message.
 java.lang.String toString()
          Get a string representation of this object.
 
Methods inherited from class org.opends.server.replication.protocol.RoutableMessage
getDestination, getsenderID
 
Methods inherited from class org.opends.server.replication.protocol.ReplicationMessage
addByteArray, generateMsg, getNextLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InitializeRequestMessage

public InitializeRequestMessage(DN baseDn,
                                short senderID,
                                short destination)
Creates a InitializeRequestMessage message.

Parameters:
baseDn - The base DN of the replication domain.
destination - destination of this message
senderID - serverID of the server that will send this message

InitializeRequestMessage

public InitializeRequestMessage(byte[] in)
                         throws java.util.zip.DataFormatException
Creates a new InitializeRequestMessage by decoding the provided byte array.

Parameters:
in - A byte array containing the encoded information for the Message
Throws:
java.util.zip.DataFormatException - If the in does not contain a properly encoded InitializeMessage.
Method Detail

getBaseDn

public DN getBaseDn()
Get the base DN from this InitializeRequestMessage.

Returns:
the base DN from this InitializeRequestMessage.

getBytes

public byte[] getBytes()
Return the byte[] representation of this message. Depending on the message type, the first byte of the byte[] must be. MSG_TYPE_MODIFY_REQUEST MSG_TYPE_ADD_REQUEST MSG_TYPE_DELETE_REQUEST MSG_TYPE_MODIFY_DN_REQUEST MSG_TYPE_ACK MSG_TYPE_SERVER_START MSG_TYPE_REPL_SERVER_START MSG_TYPE_WINDOW MSG_TYPE_HEARTBEAT MSG_TYPE_INITIALIZE MSG_TYPE_INITIALIZE_TARGET MSG_TYPE_ENTRY MSG_TYPE_DONE MSG_TYPE_ERROR MSG_TYPE_WINDOW_PROBE MSG_TYPE_REPL_SERVER_INFO MSG_TYPE_RESET_GENERATION_ID MSG_TYPE_REPL_SERVER_MONITOR_REQUEST MSG_TYPE_REPL_SERVER_MONITOR

Specified by:
getBytes in class ReplicationMessage
Returns:
the byte[] representation of this message.

toString

public java.lang.String toString()
Get a string representation of this object.

Overrides:
toString in class RoutableMessage
Returns:
A string representation of this object.