org.opends.server.replication.protocol
Class AckMessage

java.lang.Object
  extended by org.opends.server.replication.protocol.ReplicationMessage
      extended by org.opends.server.replication.protocol.AckMessage

public class AckMessage
extends ReplicationMessage

Used to send acks between LDAP and replication servers.


Constructor Summary
AckMessage(byte[] in)
          Creates a new AckMessage by decoding the provided byte array.
AckMessage(ChangeNumber changeNumber)
          Creates a new AckMessage from a ChangeNumber.
 
Method Summary
 byte[] getBytes()
          Return the byte[] representation of this message.
 ChangeNumber getChangeNumber()
          Get the ChangeNumber from the message.
 
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, toString, wait, wait, wait
 

Constructor Detail

AckMessage

public AckMessage(ChangeNumber changeNumber)
Creates a new AckMessage from a ChangeNumber.

Parameters:
changeNumber - The ChangeNumber used to build the AckMessage.

AckMessage

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

Parameters:
in - The byte array containing the encoded form of the AckMessage.
Throws:
java.util.zip.DataFormatException - If in does not contain a properly encoded AckMessage.
Method Detail

getChangeNumber

public ChangeNumber getChangeNumber()
Get the ChangeNumber from the message.

Returns:
the ChangeNumber

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.