Class ResponseFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.factory.ResponseFactory
-
- All Implemented Interfaces:
Messagefactory
- Direct Known Subclasses:
AddResponseFactory,BindResponseFactory,CompareResponseFactory,DeleteResponseFactory,ExtendedResponseFactory,IntermediateResponseFactory,ModifyDnResponseFactory,ModifyResponseFactory,SearchResultDoneFactory,SearchResultEntryFactory,SearchResultReferenceFactory
public abstract class ResponseFactory extends Object implements Messagefactory
The Response factory.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResponseFactory()Creates a new instance of ResponseFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidencodeLdapResultReverse(Asn1Buffer buffer, LdapResult ldapResult)Encode the LdapResult element
LdapResult :protected voidencodeReferralUrls(Asn1Buffer buffer, Iterator<String> urls)Encode referral's URLs recursivelyprotected voidencodeReverse(LdapApiService codec, Asn1Buffer buffer, byte tag, Message message)Encode the Response message to a PDU.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.codec.factory.Messagefactory
encodeReverse
-
-
-
-
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 urlsurls- 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 PDUldapResult- 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 instancebuffer- The buffer where to put the PDUtag- The message tagmessage- the Response to encode
-
-