Package org.ldaptive.control
Class SortResponseControl
java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.AbstractResponseControl
org.ldaptive.control.SortResponseControl
- All Implemented Interfaces:
Control,ResponseControl,Freezable
Response control for server side sorting. See RFC 2891. Control is defined as:
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 }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classParse handler implementation for the attribute type.private static classParse handler implementation for the sort result. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringFailed attribute name.private static final inthash code seed.static final StringOID of this control.private ResultCodeResult of the server side sorting.Fields inherited from class org.ldaptive.control.AbstractControl
logger -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SortResponseControl(boolean critical) Creates a new sort response control.SortResponseControl(ResultCode code, boolean critical) Creates a new sort response control.SortResponseControl(ResultCode code, String attrName, boolean critical) Creates a new sort response control. -
Method Summary
Methods inherited from class org.ldaptive.control.AbstractResponseControl
assertMutable, freeze, freezeAndAssertMutable, isFrozenMethods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
Field Details
-
OID
OID of this control.- See Also:
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
sortResult
Result of the server side sorting. -
attributeName
Failed attribute name.
-
-
Constructor Details
-
SortResponseControl
public SortResponseControl()Default constructor. -
SortResponseControl
public SortResponseControl(boolean critical) Creates a new sort response control.- Parameters:
critical- whether this control is critical
-
SortResponseControl
Creates a new sort response control.- Parameters:
code- result of the sortcritical- whether this control is critical
-
SortResponseControl
Creates a new sort response control.- Parameters:
code- result of the sortattrName- name of the failed attributecritical- whether this control is critical
-
-
Method Details
-
getSortResult
Returns the result code of the server side sort.- Returns:
- result code
-
getAttributeName
Returns the attribute name that caused the sort to fail.- Returns:
- attribute name
-
equals
- Overrides:
equalsin classAbstractControl
-
hashCode
public int hashCode()Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
hashCodein classAbstractControl- Returns:
- hash code
-
toString
- Overrides:
toStringin classAbstractControl
-
decode
Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Parameters:
encoded- BER encoded response control
-