java.lang.Object
javax.naming.ldap.BasicControl
javax.naming.ldap.SortResponseControl
- 所有已实现的接口:
Serializable,Control
指示请求的搜索结果排序是否成功。当结果代码指示成功时,结果已按要求排序。否则排序不成功,服务可能已提供有关错误原因的其他详细信息。
SortControl 中的代码示例显示了如何使用此类。
此类为 RFC 2891 中定义的服务端排序实现 LDAPv3 响应控制。控件的值具有以下 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 }
- 自从:
- 1.5
- 参见:
-
字段摘要
字段在类 javax.naming.ldap.BasicControl 中声明的字段
criticality, id, value在接口 javax.naming.ldap.Control 中声明的字段
CRITICAL, NONCRITICAL -
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述检索导致排序失败的属性的 ID。检索适用于结果代码的 NamingException。int检索排序操作的 LDAP 结果代码。booleanisSorted()确定搜索结果是否已成功排序。在类 javax.naming.ldap.BasicControl 中声明的方法
getEncodedValue, getID, isCritical
-
字段详细信息
-
OID
服务端排序响应控件分配的对象标识符是 1.2.840.113556.1.4.474。- 参见:
-
-
构造方法详细信息
-
SortResponseControl
构造一个控件以指示排序请求的结果。- 参数:
id- 控件的对象标识符字符串。criticality- 控件的关键性。value- 控件的 ASN.1 BER 编码值。它不是克隆的 - 对值的任何更改都会影响控件的内容。- 抛出:
IOException- 如果在解码控件的值时遇到错误。
-
-
方法详情
-
isSorted
public boolean isSorted()确定搜索结果是否已成功排序。如果在排序期间发生错误,则抛出 NamingException。- 返回:
- 如果搜索结果已排序,则为真。
-
getResultCode
public int getResultCode()检索排序操作的 LDAP 结果代码。- 返回:
- 结果代码。零值表示成功。
-
getAttributeID
检索导致排序失败的属性的 ID。如果服务没有返回 ID,则返回 null。- 返回:
- 错误属性的可能为空的 ID。
-
getException
检索适用于结果代码的 NamingException。- 返回:
- 如果结果代码指示成功,则为 NamingException 或 null。
-