パッケージ org.iplass.mtp.spi
クラス ServiceRegistry
java.lang.Object
org.iplass.mtp.spi.ServiceRegistry
public class ServiceRegistry
extends java.lang.Object
Serviceのレジストリです。
iPLAssが管理するServiceのインスタンスを取得可能です。
Serviceは設定ファイルにてコンフィグレーション可能です。
-
メソッドの概要
修飾子とタイプ メソッド 説明 voiddestroyAllService()すべてのサービスを破棄します。<T extends Service>
booleanexists(java.lang.Class<T> serviceClass)指定ののクラス・インタフェースを実装するServiceが登録されているかを返します。booleanexists(java.lang.String serviceName)指定の名前で登録されるServiceが登録されているかを返します。static ServiceRegistrygetRegistry()SingletonなServiceRegistryを取得します。<T extends Service>
TgetService(java.lang.Class<T> serviceClass)指定のクラス・インタフェースを実装するServiceのインスタンスを取得します。<T extends Service>
TgetService(java.lang.String serviceName)指定の名前で登録されるServiceのインスタンスを取得します。voidreInit()Serviceを再初期化します。voidsetService(java.lang.String serviceName, Service service)プログラムから明示的にサービスを登録します。voidsetService(Service service)プログラムから明示的にサービスを登録します。
-
メソッドの詳細
-
getRegistry
SingletonなServiceRegistryを取得します。- 戻り値:
-
getService
指定のクラス・インタフェースを実装するServiceのインスタンスを取得します。- パラメータ:
serviceClass-- 戻り値:
-
getService
指定の名前で登録されるServiceのインスタンスを取得します。- パラメータ:
serviceName-- 戻り値:
-
exists
指定ののクラス・インタフェースを実装するServiceが登録されているかを返します。- パラメータ:
serviceClass-- 戻り値:
-
exists
public boolean exists(java.lang.String serviceName)指定の名前で登録されるServiceが登録されているかを返します。- パラメータ:
serviceName-- 戻り値:
-
setService
プログラムから明示的にサービスを登録します。- パラメータ:
serviceName- サービスの名前service- Serviceを実装するインスタンス
-
setService
プログラムから明示的にサービスを登録します。 serviceの実装クラス名がサービス名として登録されます。- パラメータ:
service-
-
destroyAllService
public void destroyAllService()すべてのサービスを破棄します。 -
reInit
public void reInit()Serviceを再初期化します。
-