jp.go.nict.langrid.servicecontainer.handler
クラス ServiceLoader

java.lang.Object
  上位を拡張 jp.go.nict.langrid.servicecontainer.handler.ServiceLoader

public class ServiceLoader
extends Object

Service loader.

作成者:
Shingo Furukido, Takao Nakaguchi

コンストラクタの概要
ServiceLoader(ServiceContext serviceContext)
           
 
メソッドの概要
 Iterable<String> listServiceNames()
           
<T> T
load(ClassLoader classLoader, String serviceName, Class<T> serviceInterface)
          Load service.
<T> T
load(String serviceName, Class<T> serviceInterface)
          Load service.
 ServiceFactory loadServiceFactory(ClassLoader classLoader, String serviceName)
          Load service factory.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ServiceLoader

public ServiceLoader(ServiceContext serviceContext)
メソッドの詳細

listServiceNames

public Iterable<String> listServiceNames()
                                  throws IOException
例外:
IOException

load

public <T> T load(String serviceName,
                  Class<T> serviceInterface)
Load service.

型パラメータ:
T - the type of service interface.
パラメータ:
serviceName - the service name.
serviceInterface - the service interface.
戻り値:
the service loaded and configured by the service loader.

load

public <T> T load(ClassLoader classLoader,
                  String serviceName,
                  Class<T> serviceInterface)
Load service.

型パラメータ:
T - the type of service interface.
パラメータ:
classLoader - the class loader used for loading service class.
serviceName - the service name.
serviceInterface - the service interface.
戻り値:
the service loaded and configured by the service loader.

loadServiceFactory

public ServiceFactory loadServiceFactory(ClassLoader classLoader,
                                         String serviceName)
Load service factory.

パラメータ:
classLoader - the class loader used for loading service factory.
serviceName - the service name.
戻り値:
the service factory configured by the service loader.