com.sun.jndi.ldap.ctl
Class SortControl

java.lang.Object
  extended by com.sun.jndi.ldap.BasicControl
      extended by com.sun.jndi.ldap.ctl.SortControl
All Implemented Interfaces:
java.io.Serializable, javax.naming.ldap.Control

public final class SortControl
extends com.sun.jndi.ldap.BasicControl

This class implements the LDAPv3 Request Control for server-side sorting of search results as defined in RFC-2891. The control's value has the following ASN.1 definition:


     SortKeyList ::= SEQUENCE OF SEQUENCE {
         attributeType     AttributeDescription,
         orderingRule  [0] MatchingRuleId OPTIONAL,
         reverseOrder  [1] BOOLEAN DEFAULT FALSE }

 

Author:
Vincent Ryan
See Also:
SortResponseControl, Serialized Form

Field Summary
static java.lang.String OID
          The server-side sort control's assigned object identifier is 1.2.840.113556.1.4.473.
private static long serialVersionUID
           
 
Fields inherited from class com.sun.jndi.ldap.BasicControl
criticality, id, value
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Constructor Summary
SortControl(SortKey[] sortBy, boolean criticality)
          Constructs a server-side sort control.
SortControl(java.lang.String[] sortBy, boolean criticality)
          Constructs a server-side sort control.
 
Method Summary
private  byte[] setEncodedValue(SortKey[] sortKeys)
           
 
Methods inherited from class com.sun.jndi.ldap.BasicControl
getEncodedValue, getID, isCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OID

public static final java.lang.String OID
The server-side sort control's assigned object identifier is 1.2.840.113556.1.4.473.

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

SortControl

public SortControl(SortKey[] sortBy,
                   boolean criticality)
            throws java.io.IOException
Constructs a server-side sort control.

Parameters:
sortBy - The keys to sort by.
criticality - The control's criticality setting.
Throws:
java.io.IOException - If a BER encoding error occurs.

SortControl

public SortControl(java.lang.String[] sortBy,
                   boolean criticality)
            throws java.io.IOException
Constructs a server-side sort control.

Parameters:
sortBy - The attribute IDs to sort by.
criticality - The control's criticality setting.
Throws:
java.io.IOException - If a BER encoding error occurs.
Method Detail

setEncodedValue

private byte[] setEncodedValue(SortKey[] sortKeys)
                        throws java.io.IOException
Throws:
java.io.IOException