クラス DefaultStrategiesHelper
java.lang.ObjectSE
org.springframework.ws.support.DefaultStrategiesHelper
インターフェースのデフォルトの実装をロードするためのヘルパークラス。ストラテジーインターフェース名をキーとして、コンマ区切りのクラス名を値として含むプロパティオブジェクトをカプセル化します。
BeanFactoryAware.setBeanFactory(BeanFactory)、ApplicationContextAware.setApplicationContext(ApplicationContext) などを呼び出すことにより、Bean の normal lifecycle をシミュレートします。
- 導入:
- 1.0.0
- 作成者:
- Arjen Poutsma
コンストラクター概要
コンストラクターコンストラクター説明DefaultStrategiesHelper(ClassSE<?> type) 指定された型に基づいて、DefaultStrategiesHelperの新しいインスタンスを初期化します。DefaultStrategiesHelper(PropertiesSE defaultStrategies) 指定されたプロパティのセットに基づいて、DefaultStrategiesHelperの新しいインスタンスを初期化します。DefaultStrategiesHelper(org.springframework.core.io.Resource resource) 指定されたリソースに基づいて、DefaultStrategiesHelperの新しいインスタンスを初期化します。方法の概要
修飾子と型メソッド説明<T> ListSE<T>getDefaultStrategies(ClassSE<T> strategyInterface) 指定されたストラテジーインターフェースのストラテジーオブジェクトのリストを作成します。<T> ListSE<T>getDefaultStrategies(ClassSE<T> strategyInterface, org.springframework.context.ApplicationContext applicationContext) 指定されたストラテジーインターフェースのストラテジーオブジェクトのリストを作成します。<T> TgetDefaultStrategy(ClassSE<T> strategyInterface) 指定された戦略インターフェースのデフォルト戦略オブジェクトを返します。<T> TgetDefaultStrategy(ClassSE<T> strategyInterface, org.springframework.context.ApplicationContext applicationContext) 指定された戦略インターフェースのデフォルト戦略オブジェクトを返します。
コンストラクターの詳細
DefaultStrategiesHelper
指定されたプロパティのセットに基づいて、DefaultStrategiesHelperの新しいインスタンスを初期化します。DefaultStrategiesHelper
public DefaultStrategiesHelper(org.springframework.core.io.Resource resource) throws IllegalStateExceptionSE 指定されたリソースに基づいて、DefaultStrategiesHelperの新しいインスタンスを初期化します。DefaultStrategiesHelper
指定された型に基づいて、DefaultStrategiesHelperの新しいインスタンスを初期化します。このコンストラクターは、指定された型と同じパッケージ内の 'typeName' .properties ファイルをロードしようとします。
メソッドの詳細
getDefaultStrategies
public <T> ListSE<T> getDefaultStrategies(ClassSE<T> strategyInterface) throws org.springframework.beans.factory.BeanInitializationException 指定されたストラテジーインターフェースのストラテジーオブジェクトのリストを作成します。戦略は、構築時に指定されたPropertiesオブジェクトから取得されます。- パラメーター:
strategyInterface- 戦略インターフェース- 戻り値:
- 対応する戦略オブジェクトのリスト
- 例外:
org.springframework.beans.BeansException- 初期化に失敗した場合org.springframework.beans.factory.BeanInitializationException
getDefaultStrategies
public <T> ListSE<T> getDefaultStrategies(ClassSE<T> strategyInterface, org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.factory.BeanInitializationException 指定されたストラテジーインターフェースのストラテジーオブジェクトのリストを作成します。戦略は、構築時に指定されたPropertiesオブジェクトから取得されます。ストラテジーオブジェクトをインスタンス化し、必要に応じて、提供されたコンテキストでApplicationContextAwareを満たします。- パラメーター:
strategyInterface- 戦略インターフェースapplicationContext- アプリケーションのコンテキストを意識した戦略を満たすために使用され、nullの場合があります- 戻り値:
- 対応する戦略オブジェクトのリスト
- 例外:
org.springframework.beans.BeansException- 初期化に失敗した場合org.springframework.beans.factory.BeanInitializationException
getDefaultStrategy
public <T> T getDefaultStrategy(ClassSE<T> strategyInterface) throws org.springframework.beans.factory.BeanInitializationException 指定された戦略インターフェースのデフォルト戦略オブジェクトを返します。- パラメーター:
strategyInterface- 戦略インターフェース- 戻り値:
- 対応する戦略オブジェクト
- 例外:
org.springframework.beans.BeansException- 初期化に失敗した場合org.springframework.beans.factory.BeanInitializationException- 関連事項:
getDefaultStrategy
public <T> T getDefaultStrategy(ClassSE<T> strategyInterface, org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.factory.BeanInitializationException 指定された戦略インターフェースのデフォルト戦略オブジェクトを返します。リスト内の単一のオブジェクトを期待して、
getDefaultStrategies(Class,ApplicationContext)に委譲します。- パラメーター:
strategyInterface- 戦略インターフェースapplicationContext- アプリケーションのコンテキストを意識した戦略を満たすために使用され、nullの場合があります- 戻り値:
- 対応する戦略オブジェクト
- 例外:
org.springframework.beans.BeansException- 初期化に失敗した場合org.springframework.beans.factory.BeanInitializationException