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 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:
      decodeBuffer in interface com.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 the DecoderByteBuffer to determine the size of the next message.
      Parameters:
      input - The DecoderByteBufferto be read.
      Returns:
      The size of the DecoderByteBuffer or -1 if the DecoderByteBuffer is too small to contain the length. This should not be null.
      Throws:
      LDAPDecoderEngineException - If the length return is too large to fit inside an int.