org.opends.server.controls
Class ServerSideSortResponseControl

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.ServerSideSortResponseControl

public class ServerSideSortResponseControl
extends Control

This class implements the server-side sort response control as defined in RFC 2891 section 1.2. The ASN.1 description for the control value is:

 SortResult ::= SEQUENCE {
    sortResult  ENUMERATED {
        success                   (0), -- results are sorted
        operationsError           (1), -- server internal failure
        timeLimitExceeded         (3), -- timelimit reached before
                                       -- sorting was completed
        strongAuthRequired        (8), -- refused to return sorted
                                       -- results via insecure
                                       -- protocol
        adminLimitExceeded       (11), -- too many matching entries
                                       -- for the server to sort
        noSuchAttribute          (16), -- unrecognized attribute
                                       -- type in sort key
        inappropriateMatching    (18), -- unrecognized or
                                       -- inappropriate matching
                                       -- rule in sort key
        insufficientAccessRights (50), -- refused to return sorted
                                       -- results to this client
        busy                     (51), -- too busy to process
        unwillingToPerform       (53), -- unable to sort
        other                    (80)
        },
  attributeType [0] AttributeDescription OPTIONAL }
 


Constructor Summary
ServerSideSortResponseControl(int resultCode, java.lang.String attributeType)
          Creates a new server-side sort response control based on the provided result code and attribute type.
 
Method Summary
static ServerSideSortResponseControl decodeControl(Control control)
          Creates a new server-side sort response control from the contents of the provided control.
 java.lang.String getAttributeType()
          Retrieves the attribute type for this sort result.
 int getResultCode()
          Retrieves the result code for this sort result.
 java.lang.String toString()
          Retrieves a string representation of this server-side sort response control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this server-side sort response control to the provided buffer.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerSideSortResponseControl

public ServerSideSortResponseControl(int resultCode,
                                     java.lang.String attributeType)
Creates a new server-side sort response control based on the provided result code and attribute type.

Parameters:
resultCode - The result code for the sort result.
attributeType - The attribute type for the sort result (or null if there is none).
Method Detail

getResultCode

public int getResultCode()
Retrieves the result code for this sort result.

Returns:
The result code for this sort result.

getAttributeType

public java.lang.String getAttributeType()
Retrieves the attribute type for this sort result.

Returns:
The attribute type for this sort result, or null if there is none.

decodeControl

public static ServerSideSortResponseControl decodeControl(Control control)
                                                   throws LDAPException
Creates a new server-side sort response control from the contents of the provided control.

Parameters:
control - The generic control containing the information to use to create this server-side sort response control. It must not be null.
Returns:
The server-side sort response control decoded from the provided control.
Throws:
LDAPException - If this control cannot be decoded as a valid server-side sort response control.

toString

public java.lang.String toString()
Retrieves a string representation of this server-side sort response control.

Overrides:
toString in class Control
Returns:
A string representation of this server-side sort response control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this server-side sort response control to the provided buffer.

Overrides:
toString in class Control
Parameters:
buffer - The buffer to which the information should be appended.