Class CompareResponseProtocolOp


  • public class CompareResponseProtocolOp
    extends ProtocolOp
    This class defines the structures and methods for an LDAP compare response protocol op, which is used to provide information about the result of processing a compare request.
    • Constructor Detail

      • CompareResponseProtocolOp

        public CompareResponseProtocolOp​(int resultCode)
        Creates a new compare response protocol op with the provided result code.
        Parameters:
        resultCode - The result code for this response.
      • CompareResponseProtocolOp

        public CompareResponseProtocolOp​(int resultCode,
                                         org.forgerock.i18n.LocalizableMessage errorMessage)
        Creates a new compare response protocol op with the provided result code and error message.
        Parameters:
        resultCode - The result code for this response.
        errorMessage - The error message for this response.
      • CompareResponseProtocolOp

        public CompareResponseProtocolOp​(int resultCode,
                                         org.forgerock.i18n.LocalizableMessage errorMessage,
                                         DN matchedDN,
                                         List<String> referralURLs)
        Creates a new compare response protocol op with the provided information.
        Parameters:
        resultCode - The result code for this response.
        errorMessage - The error message for this response.
        matchedDN - The matched DN for this response.
        referralURLs - The referral URLs for this response.
    • Method Detail

      • getResultCode

        public int getResultCode()
        Retrieves the result code for this response.
        Returns:
        The result code for this response.
      • getErrorMessage

        public org.forgerock.i18n.LocalizableMessage getErrorMessage()
        Retrieves the error message for this response.
        Returns:
        The error message for this response, or null if none is available.
      • getMatchedDN

        public DN getMatchedDN()
        Retrieves the matched DN for this response.
        Returns:
        The matched DN for this response, or null if none is available.
      • getReferralURLs

        public List<String> getReferralURLs()
        Retrieves the set of referral URLs for this response.
        Returns:
        The set of referral URLs for this response, or null if none are available.
      • getType

        public byte getType()
        Description copied from class: ProtocolOp
        Retrieves the BER type for this protocol op.
        Specified by:
        getType in class ProtocolOp
        Returns:
        The BER type for this protocol op.
      • getProtocolOpName

        public String getProtocolOpName()
        Description copied from class: ProtocolOp
        Retrieves the name for this protocol op type.
        Specified by:
        getProtocolOpName in class ProtocolOp
        Returns:
        The name for this protocol op type.
      • write

        public void write​(ASN1Writer stream)
                   throws IOException
        Description copied from class: ProtocolOp
        Writes this protocol op to an ASN.1 output stream.
        Specified by:
        write in class ProtocolOp
        Parameters:
        stream - The ASN.1 output stream to write to.
        Throws:
        IOException - If a problem occurs while writing to the stream.
      • toString

        public void toString​(StringBuilder buffer)
        Description copied from class: ProtocolOp
        Appends a string representation of this LDAP protocol op to the provided buffer.
        Specified by:
        toString in class ProtocolOp
        Parameters:
        buffer - The buffer to which the string should be appended.
      • toString

        public void toString​(StringBuilder buffer,
                             int indent)
        Description copied from class: ProtocolOp
        Appends a multi-line string representation of this LDAP protocol op to the provided buffer.
        Specified by:
        toString in class ProtocolOp
        Parameters:
        buffer - The buffer to which the information should be appended.
        indent - The number of spaces from the margin that the lines should be indented.