Class ExtendedResult

    • Constructor Detail

      • ExtendedResult

        public ExtendedResult​(int messageID,
                              ResultCode resultCode,
                              java.lang.String diagnosticMessage,
                              java.lang.String matchedDN,
                              java.lang.String[] referralURLs,
                              java.lang.String oid,
                              ASN1OctetString value,
                              Control[] responseControls)
        Creates a new extended result with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message that is associated with this LDAP result.
        resultCode - The result code from the response.
        diagnosticMessage - The diagnostic message from the response, if available.
        matchedDN - The matched DN from the response, if available.
        referralURLs - The set of referral URLs from the response, if available.
        oid - The OID for this extended response, if available.
        value - The encoded value for this extended response, if available.
        responseControls - The set of controls from the response, if available.
      • ExtendedResult

        public ExtendedResult​(LDAPResult result)
        Creates a new extended result with the information contained in the provided LDAP result. The extended result will not have an OID or value.
        Parameters:
        result - The LDAP result whose content should be used for this extended result.
      • ExtendedResult

        public ExtendedResult​(LDAPException exception)
        Creates a new extended result from the provided LDAPException. The extended result will not have an OID or value.
        Parameters:
        exception - The LDAPException to use to create this extended result.
      • ExtendedResult

        protected ExtendedResult​(ExtendedResult extendedResult)
        Creates a new extended result initialized from all of the elements of the provided extended response.
        Parameters:
        extendedResult - The extended response to use to initialize this extended response.
    • Method Detail

      • getOID

        public final java.lang.String getOID()
        Retrieves the OID for this extended result, if available.
        Returns:
        The OID for this extended result, or null if none is available.
      • hasValue

        public final boolean hasValue()
        Indicates whether this extended result has a value.
        Returns:
        true if this extended result has a value, or false if not.
      • getValue

        public final ASN1OctetString getValue()
        Retrieves the encoded value for this extended result, if available.
        Returns:
        The encoded value for this extended result, or null if none is available.
      • getExtendedResultName

        public java.lang.String getExtendedResultName()
        Retrieves the user-friendly name for the extended result, if available. If no user-friendly name has been defined, but a response OID is available, then that will be returned. If neither a user-friendly name nor a response OID are available, then null will be returned.
        Returns:
        The user-friendly name for this extended request, the response OID if a user-friendly name is not available but a response OID is, or null if neither a user-friendly name nor a response OID are available.
      • toString

        public java.lang.String toString()
        Retrieves a string representation of this extended response.
        Overrides:
        toString in class LDAPResult
        Returns:
        A string representation of this extended response.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this extended response to the provided buffer.
        Specified by:
        toString in interface LDAPResponse
        Overrides:
        toString in class LDAPResult
        Parameters:
        buffer - The buffer to which a string representation of this extended response will be appended.