Class ModifyMsg

All Implemented Interfaces:
Comparable<UpdateMsg>

public final class ModifyMsg extends ModifyCommonMsg
Message used to send Modify information.
  • Constructor Details

    • ModifyMsg

      public ModifyMsg(CSN csn, Dn dn, UUID entryUUID, List<Modification> mods)
      Creates a new Modify message using the provided information.
      Parameters:
      csn - The CSN for the operation.
      dn - The baseDN of the operation.
      entryUUID - The unique id of the entry on which the modification needs to apply.
      mods - The mod of the operation.
    • ModifyMsg

      public ModifyMsg(CSN csn, Dn dn, UUID entryUUID, byte[] encodedMods, byte[] encodedEclIncludes)
      Creates a new Modify message using the provided information.
      Parameters:
      csn - The CSN for the operation.
      dn - The baseDN of the operation.
      entryUUID - The unique id of the entry on which the modification needs to apply.
      encodedMods - The encodedMods of the operation.
      encodedEclIncludes - The encodedEclIncludes of the operation.
  • Method Details

    • accept

      public <E extends Exception> void accept(UpdateMsgVisitor<E> visitor) throws E
      Description copied from class: UpdateMsg
      Applies an UpdateMsgVisitor to this UpdateMsg.
      Specified by:
      accept in class UpdateMsg
      Type Parameters:
      E - The type of the exception thrown by the visitor method if it fails, or NeverThrowsException if the visitor cannot fail.
      Parameters:
      visitor - The message visitor.
      Throws:
      E - If the visitor failed.
    • createRequest

      public ModifyRequest createRequest(Dn newDN) throws IOException
      Description copied from class: LDAPUpdateMsg
      Create a request from this message using the provided DN.
      Specified by:
      createRequest in class LDAPUpdateMsg
      Parameters:
      newDN - the DN to use when creating the request.
      Returns:
      the created request
      Throws:
      LdapException - In case of LDAP decoding exception
      IOException - In case of ASN1 decoding exception
    • size

      public int size()
      Description copied from class: UpdateMsg
      Return the number of bytes used by this message.
      Specified by:
      size in class LDAPUpdateMsg
      Returns:
      The number of bytes used by this message.
    • getBytesLatest

      public byte[] getBytesLatest(short protocolVersion)
      Description copied from class: LDAPUpdateMsg
      Get the byte array representation of this message.

      This uses the provided version number which must be at least version 4.

      Specified by:
      getBytesLatest in class LDAPUpdateMsg
      Parameters:
      protocolVersion - the actual protocol version to encode into
      Returns:
      The byte array representation of this Message.