Class AbstractControlFactory<C extends Control>

    • Field Detail

      • codec

        protected LdapApiService codec
        The LDAP codec responsible for encoding and decoding ManageDsaIT Control
      • oid

        protected String oid
        The control's OID
    • Constructor Detail

      • AbstractControlFactory

        protected AbstractControlFactory​(LdapApiService codec,
                                         String oid)
        Creates a new instance of AbstractControlFactory.
        Parameters:
        codec - The LdapApiSevice instance
        oid - The control's OID
    • Method Detail

      • encodeValue

        public void encodeValue​(Asn1Buffer buffer,
                                Control control)
        Encode the value part of the control.
        Specified by:
        encodeValue in interface ControlFactory<C extends Control>
        Parameters:
        buffer - The buffer into which to put the encoded value
        control - The control to encode
      • decodeValue

        public void decodeValue​(Control control,
                                byte[] controlBytes)
                         throws DecoderException
        Decode a Control's value. It will feed the Control.
        Specified by:
        decodeValue in interface ControlFactory<C extends Control>
        Parameters:
        control - The control to feed
        controlBytes - The data to decode
        Throws:
        DecoderException - If the value can't be decoded
      • decodeValue

        public void decodeValue​(ControlContainer container,
                                Control control,
                                byte[] controlBytes)
                         throws DecoderException
        Decode a Control's value. It will feed the Control.
        Specified by:
        decodeValue in interface ControlFactory<C extends Control>
        Parameters:
        container - The Asn1Container containing the control to feed
        control - The control to feed
        controlBytes - The data to decode
        Throws:
        DecoderException - If the value can't be decoded