モジュール java.naming
パッケージ 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。