Class ResponseFactory

    • Constructor Detail

      • ResponseFactory

        protected ResponseFactory()
        Creates a new instance of ResponseFactory.
    • Method Detail

      • encodeReferralUrls

        protected void encodeReferralUrls​(Asn1Buffer buffer,
                                          Iterator<String> urls)
        Encode referral's URLs recursively
        Parameters:
        buffer - The buffer that will contain the encoded urls
        urls - The urls to encode
      • encodeLdapResultReverse

        protected void encodeLdapResultReverse​(Asn1Buffer buffer,
                                               LdapResult ldapResult)
        Encode the LdapResult element
        LdapResult :
           0x0A 01 resultCode (0..80)
           0x04 L1 matchedDN (L1 = Length(matchedDN))
           0x04 L2 errorMessage (L2 = Length(errorMessage))
           [0x83 L3] referrals
             |
             +--> 0x04 L4 referral
             +--> 0x04 L5 referral
             +--> ...
             +--> 0x04 Li referral
             +--> ...
             +--> 0x04 Ln referral
         
        Parameters:
        buffer - The buffer where to put the PDU
        ldapResult - The LdapResult instance
      • encodeReverse

        protected void encodeReverse​(LdapApiService codec,
                                     Asn1Buffer buffer,
                                     byte tag,
                                     Message message)
        Encode the Response message to a PDU.
        Response :
         0x<tag> L1
          |
          +--> LdapResult
         
        Parameters:
        codec - The LdapApiService instance
        buffer - The buffer where to put the PDU
        tag - The message tag
        message - the Response to encode