org.opends.server.replication.protocol
Class DeleteMsg

java.lang.Object
  extended by org.opends.server.replication.protocol.ReplicationMessage
      extended by org.opends.server.replication.protocol.UpdateMessage
          extended by org.opends.server.replication.protocol.DeleteMsg
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UpdateMessage>

public class DeleteMsg
extends UpdateMessage

Object used when sending delete information to replication servers.

See Also:
Serialized Form

Constructor Summary
DeleteMsg(byte[] in)
          Creates a new Add message from a byte[].
DeleteMsg(PostOperationDeleteOperation operation)
          Creates a new delete message.
DeleteMsg(java.lang.String dn, ChangeNumber changeNumber, java.lang.String uid)
          Creates a new delete message.
 
Method Summary
 AbstractOperation createOperation(InternalClientConnection connection, java.lang.String newDn)
          Create and Operation from the message using the provided DN.
 byte[] getBytes()
          Get the byte array representation of this Message.
 java.lang.String toString()
          
 
Methods inherited from class org.opends.server.replication.protocol.UpdateMessage
compareTo, createOperation, decodeHeader, encodeHeader, equals, generateMsg, getChangeNumber, getDn, getUniqueId, hashCode, isAssured, setAssured, setDn
 
Methods inherited from class org.opends.server.replication.protocol.ReplicationMessage
addByteArray, generateMsg, getNextLength
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteMsg

public DeleteMsg(PostOperationDeleteOperation operation)
Creates a new delete message.

Parameters:
operation - the Operation from which the message must be created.

DeleteMsg

public DeleteMsg(java.lang.String dn,
                 ChangeNumber changeNumber,
                 java.lang.String uid)
Creates a new delete message.

Parameters:
dn - The dn with which the message must be created.
changeNumber - The change number with which the message must be created.
uid - The unique id with which the message must be created.

DeleteMsg

public DeleteMsg(byte[] in)
          throws java.util.zip.DataFormatException,
                 java.io.UnsupportedEncodingException
Creates a new Add message from a byte[].

Parameters:
in - The byte[] from which the operation must be read.
Throws:
java.util.zip.DataFormatException - The input byte[] is not a valid AddMsg
java.io.UnsupportedEncodingException - If UTF8 is not supported by the jvm
Method Detail

createOperation

public AbstractOperation createOperation(InternalClientConnection connection,
                                         java.lang.String newDn)
Create and Operation from the message using the provided DN.

Specified by:
createOperation in class UpdateMessage
Parameters:
connection - connection to use when creating the message.
newDn - the DN to use when creating the operation.
Returns:
the created Operation.

getBytes

public byte[] getBytes()
                throws java.io.UnsupportedEncodingException
Get the byte array representation of this Message.

Specified by:
getBytes in class ReplicationMessage
Returns:
The byte array representation of this Message.
Throws:
java.io.UnsupportedEncodingException - When the encoding of the message failed because the UTF-8 encoding is not supported.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object