org.opends.server.replication.protocol
Class ModifyMsg

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.ModifyMsg
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UpdateMessage>

public class ModifyMsg
extends UpdateMessage

Message used to send Modify information.

See Also:
Serialized Form

Constructor Summary
ModifyMsg(byte[] in)
          Creates a new Modify message from a byte[].
ModifyMsg(ChangeNumber changeNumber, DN dn, java.util.List<Modification> mods, java.lang.String entryuuid)
          Creates a new Modify message using the provided information.
ModifyMsg(PostOperationModifyOperation op)
          Creates a new Modify message from a ModifyOperation.
 
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

ModifyMsg

public ModifyMsg(PostOperationModifyOperation op)
Creates a new Modify message from a ModifyOperation.

Parameters:
op - The operation to use for building the message

ModifyMsg

public ModifyMsg(ChangeNumber changeNumber,
                 DN dn,
                 java.util.List<Modification> mods,
                 java.lang.String entryuuid)
Creates a new Modify message using the provided information.

Parameters:
changeNumber - The ChangeNumber for the operation.
dn - The baseDN of the operation.
mods - The mod of the operation.
entryuuid - The unique id of the entry on which the modification needs to apply.

ModifyMsg

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

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

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.

createOperation

public AbstractOperation createOperation(InternalClientConnection connection,
                                         java.lang.String newDn)
                                  throws LDAPException,
                                         ASN1Exception,
                                         java.util.zip.DataFormatException
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.
Throws:
LDAPException - In case of LDAP decoding exception.
ASN1Exception - In case of ASN1 decoding exception.
java.util.zip.DataFormatException - In case of bad msg format.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object