Class OpaqueControl

  • All Implemented Interfaces:
    Control

    public final class OpaqueControl
    extends AbstractControl
    A final Control implementation intended specifically for handling controls who's values cannot be encoded or decoded by the codec service. This situation results when no Control factory is found to be registered for this control's OID. Hence additional opaque value handling methods are included to manage the opaque control value.
    Author:
    Apache Directory Project
    • Constructor Detail

      • OpaqueControl

        public OpaqueControl​(String oid)
        Creates a Control with a specific OID.
        Parameters:
        oid - The OID of this Control.
      • OpaqueControl

        public OpaqueControl​(String oid,
                             boolean criticality)
        Creates a Control with a specific OID, and criticality set.
        Parameters:
        oid - The OID of this Control.
        criticality - true if this Control is critical, false otherwise.
    • Method Detail

      • getEncodedValue

        public byte[] getEncodedValue()
        Returns:
        The encoded value
      • setEncodedValue

        public void setEncodedValue​(byte[] value)
        Stores an opaque value into the control.
        Parameters:
        value - The opaque value to store
      • hasEncodedValue

        public boolean hasEncodedValue()
        Tells if the control has a stored value. Note that if the control has an empty value, this method will return true.
        Returns:
        true if the control has a value