| 修飾子と型 | クラス | 説明 |
|---|---|---|
static class |
KeySelector.Purpose |
選択されるキーの目的です。
|
| 修飾子 | コンストラクタ | 説明 |
|---|---|---|
protected |
KeySelector() |
デフォルトは引数のないコンストラクタで、サブクラスによる呼出しのみを想定しています。
|
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
abstract KeySelectorResult |
select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) |
指定された制約を満たすキーの検索を試みます。
|
static KeySelector |
singletonKeySelector(Key key) |
渡される
KeyInfoに関係なく、常に指定したキーを選択するKeySelectorを返します。 |
public abstract KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException
keyInfo - KeyInfo (nullも可能)purpose - キーの目的(KeySelector.Purpose.SIGN、KeySelector.Purpose.VERIFY、KeySelector.Purpose.ENCRYPT、またはKeySelector.Purpose.DECRYPT)method - このキーが使用される対象のアルゴリズム・メソッド。 アルゴリズムと互換性があり、指定したアルゴリズムの制約を満たすキーだけが返される。 context - 適切なキーの検索に役立つ情報が含まれている場合のあるXMLCryptoContext。 このキー・セレクタがRetrievalMethod型の解決をサポートしている場合は、コンテキストのbaseURIおよびdereferencerパラメータ(指定されている場合)を使ってURIの解決と間接参照が行われる。 KeySelectorException - キーの検索を試みている途中で例外的な状況が発生した場合。 キーを検索できないことが例外であると見なされることはない(その場合はnullが返される)。 ただし、KeySelectorが可能性のあるキーを検索できなくなるエラー状況(ネットワーク通信障害など)は例外と見なされる。 ClassCastException - methodのデータ型がこのキー・セレクタによってサポートされていない場合public static KeySelector singletonKeySelector(Key key)
KeyInfoに関係なく、常に指定したキーを選択するKeySelectorを返します。key - キー・セレクタに格納される唯一のキーNullPointerException - keyがnullである場合 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。