public final class SortResponseControl extends BasicControl
SortControl
中的代码示例显示了如何使用这个类。
中所定义的此类实现服务器端排序的LDAPv3的响应控制RFC 2891 。 控件的值具有以下ASN.1定义:
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 inappro-
-- priate 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] AttributeType OPTIONAL }
SortControl
, Serialized Form
Modifier and Type | Field and Description |
---|---|
static String |
OID
服务器端排序响应控件的分配对象标识符为1.2.840.113556.1.4.474。
|
criticality, id, value
CRITICAL, NONCRITICAL
Constructor and Description |
---|
SortResponseControl(String id, boolean criticality, byte[] value)
构造一个控件来指示排序请求的结果。
|
Modifier and Type | Method and Description |
---|---|
String |
getAttributeID()
检索导致排序失败的属性的ID。
|
NamingException |
getException()
检索适合结果代码的NamingException。
|
int |
getResultCode()
检索排序操作的LDAP结果代码。
|
boolean |
isSorted()
确定搜索结果是否已成功排序。
|
getEncodedValue, getID, isCritical
public static final String OID
public SortResponseControl(String id, boolean criticality, byte[] value) throws IOException
id
- 控件的对象标识符字符串。
criticality
- 控制的关键性。
value
- 控制的ASN.1 BER编码值。
它不被克隆 - 任何值的更改将影响控件的内容。
IOException
- 如果在解码控件的值时遇到错误。
public boolean isSorted()
public int getResultCode()
public String getAttributeID()
public NamingException getException()