Package com.isode.dsapi.internal
Class LDAPDecoderEngine
java.lang.Object
com.isode.dsapi.internal.LDAPDecoderEngine
- All Implemented Interfaces:
com.isode.nettrace.decoder.engine.DecoderEngine
public class LDAPDecoderEngine
extends Object
implements com.isode.nettrace.decoder.engine.DecoderEngine
Decodes LDAP messages passed to the Decoder. Reads in LDAP messages from the decoder's
data sink one at a time (using the size attribute in the tag to determine their length) and
decodes them.
The results are passed back as strings to the
DecoderObserver. If
their is insufficient data to read in a full LDAP message, the DecoderEngine
instruct the Decoder to wait for more information.- Since:
- 16.0
- Author:
- ac
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodeBuffer(com.isode.nettrace.decoder.DecoderByteBuffer input) intgetLengthOfNextMessage(com.isode.nettrace.decoder.DecoderByteBuffer input) Reads the first few bytes in theDecoderByteBufferto determine the size of the next message.
-
Constructor Details
-
LDAPDecoderEngine
public LDAPDecoderEngine()
-
-
Method Details
-
decodeBuffer
public String decodeBuffer(com.isode.nettrace.decoder.DecoderByteBuffer input) throws com.isode.nettrace.decoder.engine.DecoderEngineException - Specified by:
decodeBufferin interfacecom.isode.nettrace.decoder.engine.DecoderEngine- Throws:
com.isode.nettrace.decoder.engine.DecoderEngineException
-
getLengthOfNextMessage
public int getLengthOfNextMessage(com.isode.nettrace.decoder.DecoderByteBuffer input) throws LDAPDecoderEngineException Reads the first few bytes in theDecoderByteBufferto determine the size of the next message.- Parameters:
input- TheDecoderByteBufferto be read.- Returns:
- The size of the
DecoderByteBufferor -1 if theDecoderByteBufferis too small to contain the length. This should not benull. - Throws:
LDAPDecoderEngineException- If the length return is too large to fit inside anint.
-