JavaTM Platform
Standard Ed. 6

javax.naming.ldap
クラス SortResponseControl

java.lang.Object
  上位を拡張 javax.naming.ldap.BasicControl
      上位を拡張 javax.naming.ldap.SortResponseControl
すべての実装されたインタフェース:
Serializable, Control

public final class SortResponseControl
extends BasicControl

検索結果が要求どおりにソートされたかどうかを示します。結果コードが成功を示している場合、検索結果は要求どおりにソートされています。そうでない場合は、ソートは失敗しており、エラーの原因に関する詳細がサーバーから提供されていることもあります。

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
関連項目:
SortControl, 直列化された形式

フィールドの概要
static String OID
          サーバー側でのソートの応答コントロールに割り当てられているオブジェクト識別子は 1.2.840.113556.1.4.474 です。
 
クラス javax.naming.ldap.BasicControl から継承されたフィールド
criticality, id, value
 
インタフェース javax.naming.ldap.Control から継承されたフィールド
CRITICAL, NONCRITICAL
 
コンストラクタの概要
SortResponseControl(String id, boolean criticality, byte[] value)
          ソート要求の結果を示すためのコントロールを構築します。
 
メソッドの概要
 String getAttributeID()
          ソート失敗の原因となった属性の ID を取得します。
 NamingException getException()
          結果コードに適した NamingException を取得します。
 int getResultCode()
          ソート操作の LDAP 結果コードを取得します。
 boolean isSorted()
          検索結果が正常にソートされているかどうかを判定します。
 
クラス javax.naming.ldap.BasicControl から継承されたメソッド
getEncodedValue, getID, isCritical
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

OID

public static final String OID
サーバー側でのソートの応答コントロールに割り当てられているオブジェクト識別子は 1.2.840.113556.1.4.474 です。

関連項目:
定数フィールド値
コンストラクタの詳細

SortResponseControl

public SortResponseControl(String id,
                           boolean criticality,
                           byte[] value)
                    throws IOException
ソート要求の結果を示すためのコントロールを構築します。

パラメータ:
id - コントロールのオブジェクト識別子の文字列
criticality - コントロールのクリティカルの程度
value - コントロールの ASN.1 BER で符号化された値。この値は複製されないので、この値を変更すると コントロールの内容に影響する
例外:
IOException - コントロールの値を復号化するときに エラーが発生した場合
メソッドの詳細

isSorted

public boolean isSorted()
検索結果が正常にソートされているかどうかを判定します。ソート中にエラーが発生した場合は、NamingException がスローされます。

戻り値:
検索結果がソートされている場合は true

getResultCode

public int getResultCode()
ソート操作の LDAP 結果コードを取得します。

戻り値:
結果コード。値 0 は成功を示す

getAttributeID

public String getAttributeID()
ソート失敗の原因となった属性の ID を取得します。サーバーから ID が返されなかった場合は、null を返します。

戻り値:
原因となった属性の ID。 null の場合もある

getException

public NamingException getException()
結果コードに適した NamingException を取得します。

戻り値:
NamingException。 結果コードが成功を示している場合は null

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。