org.robokind.api.common.services
Class ServiceUtils

java.lang.Object
  extended by org.robokind.api.common.services.ServiceUtils

public class ServiceUtils
extends Object

Author:
Matthew Stevenson

Constructor Summary
ServiceUtils()
           
 
Method Summary
static
<Conf,Param>
SingleServiceListener<ConfigurationWriter<Conf,Param>>
createWriterServiceListener(org.osgi.framework.BundleContext context, Class<Conf> configClass, Class<Param> paramClass, VersionProperty configFormat, String serviceFilter)
           
static ManagedService registerConfigLoader(org.osgi.framework.BundleContext context, ConfigurationLoader loader)
           
static ManagedService registerConfigLoader(org.osgi.framework.BundleContext context, ConfigurationLoader loader, Properties props)
           
static ManagedService registerConfigWriter(org.osgi.framework.BundleContext context, ConfigurationWriter writer)
           
static ManagedService registerConfigWriter(org.osgi.framework.BundleContext context, ConfigurationWriter writer, Properties props)
           
static ManagedService registerFactory(org.osgi.framework.BundleContext context, ServiceFactory fact)
          Registers the given ServiceFactory with the factory's Service Version, Service class, and Config class.
static ManagedService registerFactory(org.osgi.framework.BundleContext context, ServiceFactory fact, Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceUtils

public ServiceUtils()
Method Detail

registerFactory

public static ManagedService registerFactory(org.osgi.framework.BundleContext context,
                                             ServiceFactory fact)
Registers the given ServiceFactory with the factory's Service Version, Service class, and Config class. *

Parameters:
context - BundleContext for registering the factory
fact - ServiceFactory to register
Returns:
ServiceRegistration from registering the factory

registerFactory

public static ManagedService registerFactory(org.osgi.framework.BundleContext context,
                                             ServiceFactory fact,
                                             Properties props)

registerConfigLoader

public static ManagedService registerConfigLoader(org.osgi.framework.BundleContext context,
                                                  ConfigurationLoader loader)

registerConfigLoader

public static ManagedService registerConfigLoader(org.osgi.framework.BundleContext context,
                                                  ConfigurationLoader loader,
                                                  Properties props)

registerConfigWriter

public static ManagedService registerConfigWriter(org.osgi.framework.BundleContext context,
                                                  ConfigurationWriter writer)

registerConfigWriter

public static ManagedService registerConfigWriter(org.osgi.framework.BundleContext context,
                                                  ConfigurationWriter writer,
                                                  Properties props)

createWriterServiceListener

public static <Conf,Param> SingleServiceListener<ConfigurationWriter<Conf,Param>> createWriterServiceListener(org.osgi.framework.BundleContext context,
                                                                                                              Class<Conf> configClass,
                                                                                                              Class<Param> paramClass,
                                                                                                              VersionProperty configFormat,
                                                                                                              String serviceFilter)


Copyright © 2011-2013. All Rights Reserved.