|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.common.services.ServiceConnectionDirectory
public class ServiceConnectionDirectory
The ServiceConnectionDirectory helps locate the proper ConfigurationLoader and ServiceFactory to build the right Service from the given parameters.
Constructor Summary | |
---|---|
ServiceConnectionDirectory()
|
Method Summary | ||
---|---|---|
static
|
buildService(org.osgi.framework.BundleContext context,
VersionProperty serviceVersion,
VersionProperty configFormat,
Param param,
Class<Param> paramClass,
Class<ServiceClass> serviceClass)
Locates the appropriate ConfigurationLoader and ServiceFactory matching the given versions, and able to create Service instance of the ServiceClass using the given param. |
|
static
|
buildServiceContext(org.osgi.framework.BundleContext context,
VersionProperty serviceVersion,
VersionProperty configFormat,
Class<ServiceClass> serviceClass,
Class<Param> paramClass)
Locates an appropriate ConfigurationLoader and ServiceFactory matching the given versions, and able to create Service instance of the ServiceClass using a parameter of the given Param Class. |
|
static
|
getConfigLoaders(org.osgi.framework.BundleContext context,
VersionProperty configFormat,
Class<ServiceConfig> configClass,
Class<Param> paramClass)
Retrieves all ServiceConfigurationLoaders with the given Param Class, ServiceConfig Class, and Configuration Format Version. |
|
static
|
getConfigWriters(org.osgi.framework.BundleContext context,
VersionProperty configFormat,
Class<ServiceConfig> configClass,
Class<Param> paramClass)
Finds ServiceConfigurationWriters matching the given criteria. |
|
static
|
getServiceFactories(org.osgi.framework.BundleContext context,
VersionProperty serviceVersion,
Class<ServiceClass> serviceClass)
Retrieves all ServiceFactories with the given ServiceClass and Service Version. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceConnectionDirectory()
Method Detail |
---|
public static <ServiceClass,Param> ServiceClass buildService(org.osgi.framework.BundleContext context, VersionProperty serviceVersion, VersionProperty configFormat, Param param, Class<Param> paramClass, Class<ServiceClass> serviceClass) throws Exception
ServiceClass
- Class of the Service builtParam
- Class of the parameter required to build the Servicecontext
- BundleContext used to located ServiceConfigurationLoaders
and ServiceFactoriesserviceVersion
- Version of the Service to be built. This is used
to locate the proper ServiceFactoryconfigFormat
- Version of the ServiceConfiguration data format.
This is used to locate the proper ConfigurationLoaderparam
- Parameter to load a ServiceConfig from. This is passed to
a ConfigurationLoaderparamClass
- Class of the Param to be read. This is needed in
addition to the Param instance in order to resolve the correct class when
dealing with inheritance.serviceClass
- Class of the Service to be built
Exception
public static <ServiceClass,Param> ServiceContext<ServiceClass,?,Param> buildServiceContext(org.osgi.framework.BundleContext context, VersionProperty serviceVersion, VersionProperty configFormat, Class<ServiceClass> serviceClass, Class<Param> paramClass)
ServiceClass
- Class of the Service builtParam
- Class of the parameter required to build the Servicecontext
- BundleContext used to located ServiceConfigurationLoaders
and ServiceFactoriesserviceVersion
- Version of the Service to be built. This is used
to locate the proper ServiceFactoryconfigFormat
- Version of the ServiceConfiguration data format.
This is used to locate the proper ConfigurationLoaderserviceClass
- Class of the Service to be builtparamClass
- Class of the parameter required by the
ConfigurationLoader
public static <ServiceClass> List<ServiceFactory<ServiceClass,?>> getServiceFactories(org.osgi.framework.BundleContext context, VersionProperty serviceVersion, Class<ServiceClass> serviceClass)
ServiceClass
- Class of the Service builtcontext
- BundleContext used to located the ServiceFactoriesserviceVersion
- Version of the Service to be built. This is used
to locate the proper ServiceFactoryserviceClass
- Class of the Service to be built
public static <ServiceConfig,Param> List<ConfigurationLoader<ServiceConfig,Param>> getConfigLoaders(org.osgi.framework.BundleContext context, VersionProperty configFormat, Class<ServiceConfig> configClass, Class<Param> paramClass)
ServiceConfig
- Class of ServiceConfig to be returnedParam
- Class of the parameter accepted by the loaderscontext
- BundleContext used to locate the loadersconfigFormat
- Version of the ServiceConfiguration data format.
This is used to locate the proper ConfigurationLoaderconfigClass
- Class of ServiceConfig to be returnedparamClass
- Class of the parameter accepted by the loaders
public static <ServiceConfig,Param> List<ConfigurationWriter<ServiceConfig,Param>> getConfigWriters(org.osgi.framework.BundleContext context, VersionProperty configFormat, Class<ServiceConfig> configClass, Class<Param> paramClass)
ServiceConfig
- type of configuration to writeParam
- parameter type used for writingcontext
- BundleContext used to locate writersconfigFormat
- Version of the ServiceConfiguration data formatconfigClass
- Class of ServiceConfig to be returnedparamClass
- Class of the parameter accepted by the writers
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |