Package org.ldaptive.control
Class SortResponseControl
- java.lang.Object
-
- org.ldaptive.control.AbstractControl
-
- org.ldaptive.control.SortResponseControl
-
- All Implemented Interfaces:
Control
,ResponseControl
public class SortResponseControl extends AbstractControl implements 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 Classes Modifier and Type Class Description private static class
SortResponseControl.AttributeTypeHandler
Parse handler implementation for the attribute type.private static class
SortResponseControl.SortResultHandler
Parse handler implementation for the sort result.
-
Field Summary
Fields Modifier and Type Field Description private String
attributeName
Failed attribute name.private static int
HASH_CODE_SEED
hash code seed.static String
OID
OID of this control.private ResultCode
sortResult
Result of the server side sorting.-
Fields inherited from class org.ldaptive.control.AbstractControl
logger
-
-
Constructor Summary
Constructors Constructor Description SortResponseControl()
Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decode(DERBuffer encoded)
Initializes this response control with the supplied BER encoded data.boolean
equals(Object o)
String
getAttributeName()
Returns the attribute name that caused the sort to fail.ResultCode
getSortResult()
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.String
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 Detail
-
OID
public static final String OID
OID of this control.- See Also:
- Constant Field Values
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
sortResult
private ResultCode sortResult
Result of the server side sorting.
-
attributeName
private String attributeName
Failed attribute name.
-
-
Constructor Detail
-
SortResponseControl
public SortResponseControl()
Default constructor.
-
SortResponseControl
public SortResponseControl(boolean critical)
Creates a new sort response control.- Parameters:
critical
- whether this control is critical
-
SortResponseControl
public SortResponseControl(ResultCode code, boolean critical)
Creates a new sort response control.- Parameters:
code
- result of the sortcritical
- whether this control is critical
-
SortResponseControl
public SortResponseControl(ResultCode code, String attrName, boolean critical)
Creates a new sort response control.- Parameters:
code
- result of the sortattrName
- name of the failed attributecritical
- whether this control is critical
-
-
Method Detail
-
getSortResult
public ResultCode getSortResult()
Returns the result code of the server side sort.- Returns:
- result code
-
setSortResult
public void setSortResult(ResultCode code)
Sets the result code of the server side sort.- Parameters:
code
- result code
-
getAttributeName
public String getAttributeName()
Returns the attribute name that caused the sort to fail.- Returns:
- attribute name
-
setAttributeName
public void setAttributeName(String name)
Sets the attribute name that caused the sort to fail.- Parameters:
name
- of an attribute
-
equals
public boolean equals(Object o)
- 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
public String toString()
- Overrides:
toString
in classAbstractControl
-
decode
public void decode(DERBuffer encoded)
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
-
-