public class ServiceConnectionDirectory extends Object
| Constructor and Description |
|---|
ServiceConnectionDirectory() |
| Modifier and Type | Method and Description |
|---|---|
static <ServiceClass,Param> |
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 <ServiceClass,Param> |
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 <ServiceConfig,Param> |
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 <ServiceConfig,Param> |
getConfigWriters(org.osgi.framework.BundleContext context,
VersionProperty configFormat,
Class<ServiceConfig> configClass,
Class<Param> paramClass)
Finds ServiceConfigurationWriters matching the given criteria.
|
static <ServiceClass> |
getServiceFactories(org.osgi.framework.BundleContext context,
VersionProperty serviceVersion,
Class<ServiceClass> serviceClass)
Retrieves all ServiceFactories with the given ServiceClass and Service
Version.
|
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 builtExceptionpublic 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
ConfigurationLoaderpublic 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 builtpublic 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 loaderspublic 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 writersCopyright © 2011-2014. All Rights Reserved.