Class JDAPResult

  • Direct Known Subclasses:
    JDAPAddResponse, JDAPBindResponse, JDAPCompareResponse, JDAPDeleteResponse, JDAPExtendedResponse, JDAPModifyRDNResponse, JDAPModifyResponse, JDAPSearchResult

    public class JDAPResult
    extends java.lang.Object
    This class implements the ldap result where stores the request status. It is the base class for all the response except search response. This object is sent from the server to the client interface.
     LDAPResult ::= SEQUENCE {
       resultCode ENUMERATED {
         success (0),
         ...
       },
       matchedDN LDAPDN,
       errorMessage LDAPString
     }
     
    Note that LDAPv3 supports referral within the LDAP Result. The added component is:
     LDAPResult ::= SEQUENCE {
       ...
       errorMessage LDAPString,
       referral [3] Referral OPTIONAL
     }
     
    • Constructor Detail

      • JDAPResult

        public JDAPResult​(BERElement element)
                   throws java.io.IOException
        Constructs ldap result.
        Parameters:
        element - ber element
        Throws:
        java.io.IOException
    • Method Detail

      • getResultCode

        public int getResultCode()
        Gets the result code.
        Returns:
        result code
      • getMatchedDN

        public java.lang.String getMatchedDN()
        Gets the matched dn.
        Returns:
        matched dn
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Gets the error message.
        Returns:
        error message
      • getReferrals

        public java.lang.String[] getReferrals()
        Retrieves referrals from the LDAP Result.
        Returns:
        list of referrals in URL format
      • getBERElement

        public BERElement getBERElement()
        Retrieves the ber representation of the result.
        Returns:
        ber representation of the result
      • getParamString

        public java.lang.String getParamString()
        Retrieves string representation of the result. Usually, the inherited class calls this to retrieve the parameter string.
        Returns:
        string representation
      • toString

        public java.lang.String toString()
        Retrieves string representation of the result.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation