Class LDAPMessage


  • public class LDAPMessage
    extends Sequence
    • Constructor Detail

      • LDAPMessage

        public LDAPMessage()
      • LDAPMessage

        public LDAPMessage​(int messageID)
    • Method Detail

      • getBuffer

        public java.nio.ByteBuffer getBuffer()
        Returns the BER encoded LDAP message as a ByteBuffer
        Overrides:
        getBuffer in class Sequence
      • parse

        public boolean parse​(java.io.InputStream is)
                      throws java.lang.Exception
        This method is called to parse an input message. On success the getRequest() and getMessageID() methods can be called to retrieve the LDAP request.
        Throws:
        java.lang.Exception
      • parse

        public boolean parse​(java.io.InputStream is,
                             java.lang.String charset,
                             java.util.Vector binattrs)
                      throws java.lang.Exception
        This method is called to parse an input message. On success the getRequest() and getMessageID() methods can be called to retrieve the LDAP request.
        Throws:
        java.lang.Exception
      • getMessageID

        public int getMessageID()
        Returns the message id for this LDAP message
      • setResponse

        public void setResponse​(Sequence response)
        Sets the response (LDAPResult) message that is sent back to the client.
      • setControls

        public void setControls​(java.lang.Object[] arr)
                         throws java.lang.Exception
        Sets the controls array (array of LDAPControl objects) that is sent back to the client.
        Throws:
        java.lang.Exception
      • setMessageID

        public void setMessageID​(int messageID)
        Sets the messageID to use in a response packet.
      • getRequest

        public Request getRequest()
        Returns the request object from the LDAP message ( call after successful parse() )
      • getEntry

        public Entry getEntry()
        Returns the normalized Entry object that represents the LDAP message
      • dump

        public void dump​(Log log)
        Dumps the contents of the LDAP message to the log