Class SortRequestControl

  • All Implemented Interfaces:
    Control, RequestControl

    public class SortRequestControl
    extends AbstractControl
    implements RequestControl
    Request control for server side sorting. See RFC 2891. Control is defined as:
       SortKeyList ::= SEQUENCE OF SEQUENCE {
          attributeType   AttributeDescription,
          orderingRule    [0] MatchingRuleId OPTIONAL,
          reverseOrder    [1] BOOLEAN DEFAULT FALSE }
     
    • Constructor Detail

      • SortRequestControl

        public SortRequestControl()
        Default constructor.
      • SortRequestControl

        public SortRequestControl​(SortKey[] keys)
        Creates a new sort request control.
        Parameters:
        keys - sort keys
      • SortRequestControl

        public SortRequestControl​(SortKey[] keys,
                                  boolean critical)
        Creates a new sort request control.
        Parameters:
        keys - sort keys
        critical - whether this control is critical
    • Method Detail

      • hasValue

        public boolean hasValue()
        Description copied from interface: RequestControl
        Returns whether the control has a value associated with it.
        Specified by:
        hasValue in interface RequestControl
        Returns:
        whether the control has a value
      • getSortKeys

        public SortKey[] getSortKeys()
        Returns the sort keys.
        Returns:
        sort keys
      • setSortKeys

        public void setSortKeys​(SortKey[] keys)
        Sets the sort keys.
        Parameters:
        keys - sort keys
      • hashCode

        public int hashCode()
        Description copied from class: AbstractControl
        Returns the hash code for this object.
        Specified by:
        hashCode in class AbstractControl
        Returns:
        hash code
      • encode

        public byte[] encode()
        Description copied from interface: RequestControl
        Provides the BER encoding of this control.
        Specified by:
        encode in interface RequestControl
        Returns:
        BER encoded request control