- java.lang.Object
 -  
      
- javax.naming.ldap.BasicControl
 -  
        
- javax.naming.ldap.SortResponseControl
 
 
 
-  
       
- 实现的所有接口
 -  
         
Serializable,Control 
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 }- 从以下版本开始:
 - 1.5
 - 另请参见:
 -  
         
SortControl, Serialized Form 
 
-  
        
       
-  
             
字段汇总
字段 变量和类型 字段 描述 static StringOID服务器端排序响应控件的已分配对象标识符为1.2.840.113556.1.4.474。-  
               
声明的属性在类 javax.naming.ldap.BasicControl
criticality, id, value 
-  
               
Fields declared in interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL 
 -  
               
 
-  
             
构造方法摘要
构造方法 构造器 描述 SortResponseControl(String id, boolean criticality, byte[] value)构造一个控件以指示排序请求的结果。 
-  
             
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 StringgetAttributeID()检索导致排序失败的属性的ID。NamingExceptiongetException()检索适用于结果代码的NamingException。intgetResultCode()检索排序操作的LDAP结果代码。booleanisSorted()确定搜索结果是否已成功排序。-  
               
声明方法的类 javax.naming.ldap.BasicControl
getEncodedValue, getID, isCritical 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
构造方法详细信息
-  
SortResponseControl
public SortResponseControl(String id, boolean criticality, byte[] value) throws IOException
构造一个控件以指示排序请求的结果。- 参数
 -  
              
id- 控件的对象标识符字符串。 -  
              
criticality- 控件的criticality。 -  
              
value- 控制器的ASN.1 BER编码值。 它没有被克隆 - 任何值的更改都会影响控件的内容。 - 异常
 -  
              
IOException- 如果在解码控件的值时遇到错误。 
 
 -  
 
-  
             
方法详细信息
-  
isSorted
public boolean isSorted()
确定搜索结果是否已成功排序。 如果在排序期间发生错误,则抛出NamingException。- 结果
 - 如果搜索结果已排序,则为true。
 
 
-  
getResultCode
public int getResultCode()
检索排序操作的LDAP结果代码。- 结果
 - 结果代码。 零值表示成功。
 
 
-  
getAttributeID
public String getAttributeID()
检索导致排序失败的属性的ID。 如果服务器未返回ID,则返回null。- 结果
 - bad属性的可能为null的ID。
 
 
-  
getException
public NamingException getException()
检索适用于结果代码的NamingException。- 结果
 - A NamingException or null if the result code indicates success.
 
 
 -  
 
 -