Package org.ldaptive.control
Class SortResponseControl
java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.SortResponseControl
- All Implemented Interfaces:
Control
,ResponseControl
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 class
Parse handler implementation for the attribute type.private static class
Parse handler implementation for the sort result. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Failed attribute name.private static final int
hash code seed.static final String
OID of this control.private ResultCode
Result 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
Modifier and TypeMethodDescriptionvoid
Initializes this response control with the supplied BER encoded data.boolean
Returns the attribute name that caused the sort to fail.Returns the result code of the server side sort.int
hashCode()
Returns the hash code for this object.void
setAttributeName
(String name) Sets the attribute name that caused the sort to fail.void
setSortResult
(ResultCode code) Sets the result code of the server side sort.toString()
Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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
-
setSortResult
Sets the result code of the server side sort.- Parameters:
code
- result code
-
getAttributeName
Returns the attribute name that caused the sort to fail.- Returns:
- attribute name
-
setAttributeName
Sets the attribute name that caused the sort to fail.- Parameters:
name
- of an attribute
-
equals
- Overrides:
equals
in classAbstractControl
-
hashCode
public int hashCode()Description copied from class:AbstractControl
Returns the hash code for this object.- Specified by:
hashCode
in classAbstractControl
- Returns:
- hash code
-
toString
- Overrides:
toString
in classAbstractControl
-
decode
Description copied from interface:ResponseControl
Initializes this response control with the supplied BER encoded data.- Specified by:
decode
in interfaceResponseControl
- Parameters:
encoded
- BER encoded response control
-