Interface ControlDecoder<C extends Control>

Type Parameters:
C - The type of control decoded by this control decoder.

public interface ControlDecoder<C extends Control>
A factory interface for decoding a control as a control of specific type.
  • Method Summary

    Modifier and Type
    Method
    Description
    default C
    Decodes the provided control as a Control of type C using the default decode options.
    decodeControl(Control control, DecodeOptions options)
    Decodes the provided control as a Control of type C.
    Returns the numeric OID associated with this control decoder.
  • Method Details

    • decodeControl

      C decodeControl(Control control, DecodeOptions options) throws DecodeException
      Decodes the provided control as a Control of type C.
      Parameters:
      control - The control to be decoded.
      options - The set of decode options which should be used when decoding the control.
      Returns:
      The decoded control.
      Throws:
      DecodeException - If the control contained the wrong OID, it did not have a value, or if its value could not be decoded.
    • decodeControl

      default C decodeControl(Control control) throws DecodeException
      Decodes the provided control as a Control of type C using the default decode options.
      Parameters:
      control - The control to be decoded.
      Returns:
      The decoded control.
      Throws:
      DecodeException - If the control contained the wrong OID, it did not have a value, or if its value could not be decoded.
    • getOid

      String getOid()
      Returns the numeric OID associated with this control decoder.
      Returns:
      The numeric OID associated with this control decoder.