Class AbstractRequestDsml<E extends Request>

    • Constructor Detail

      • AbstractRequestDsml

        public AbstractRequestDsml​(LdapApiService codec,
                                   E ldapMessage)
        Creates a new instance of AbstractRequestDsml.
        Parameters:
        codec - The LDAP Service to use
        ldapMessage - the message to decorate
    • Method Detail

      • toDsml

        public Element toDsml​(Element root)
        Creates the Request Element and adds RequestID and Controls.
        Specified by:
        toDsml in interface DsmlDecorator<E extends Request>
        Parameters:
        root - the root element
        Returns:
        the Request Element of the given name containing
      • getRequestName

        protected String getRequestName()
        Gets the name of the request according to the type of the decorated element.
        Returns:
        the name of the request according to the type of the decorated element.
      • computeLength

        public int computeLength()
        Returns:
        the buffer's length (always 0)
      • encode

        public ByteBuffer encode​(ByteBuffer buffer)
                          throws EncoderException
        Encode the request. Always return an empty buffer.
        Parameters:
        buffer - The buffer to allocate
        Returns:
        The resulting buffer
        Throws:
        EncoderException - If we had an error while encoding the request
      • hasResponse

        public boolean hasResponse()
        Tests to see if this Request produces one or more response types.
        Specified by:
        hasResponse in interface Request
        Returns:
        true if a response can be expected, false otherwise.