Package org.osgi.service.cm

Examples of org.osgi.service.cm.ManagedServiceFactory


    public void provideConfiguration( ServiceReference<ManagedServiceFactory> reference, TargetedPID configPid,
        TargetedPID factoryPid, Dictionary<String, ?> properties, long revision, ConfigurationMap<?> configs )
    {
        // Get the ManagedServiceFactory and terminate here if already
        // unregistered from the framework concurrently
        ManagedServiceFactory service = getRealService( reference );
        if (service == null) {
            return;
        }

        // Get the Configuration-to-PID map from the parameter or from
View Full Code Here


    @Override
    public void removeConfiguration( ServiceReference<ManagedServiceFactory> reference, TargetedPID configPid,
        TargetedPID factoryPid )
    {
        final ManagedServiceFactory service = this.getRealService( reference );
        final ConfigurationMap configs = this.getService( reference );
        if ( service != null && configs != null)
        {
            if ( configs.removeConfiguration( configPid, factoryPid ) )
            {
View Full Code Here

    // Configuration of baz
    Properties conf = new Properties();
    conf.put("baz", "zab");
    conf.put("bar", new Integer(2));
    conf.put("foo", "foo");
    ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
    try {
      ms.updated(instance.getInstanceName(), conf);
    } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

    // Recheck props
    fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance.getInstanceName());
    fooP = (String) fooRef.getProperty("foo");
View Full Code Here

        // Configuration of baz
        Properties conf = new Properties();
        conf.put("baz", "zab");
        conf.put("bar", new Integer(2));
        conf.put("foo", "foo");
        ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
        try {
            ms.updated(instance2.getInstanceName(), conf);
        } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

        // Recheck props
        fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
        fooP = (String) fooRef.getProperty("foo");
View Full Code Here

      // Configuration of baz
      Properties conf = new Properties();
      conf.put("baz", "zab");
      conf.put("foo", "oof");
      conf.put("bar", new Integer(0));
      ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
      try {
        ms.updated(instance.getInstanceName(), conf);
      } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

      // Recheck props
      fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance.getInstanceName());
      fooP = (String) fooRef.getProperty("foo");
View Full Code Here

        // Configuration of baz
        Properties conf = new Properties();
        conf.put("baz", "zab");
        conf.put("foo", "oof");
        conf.put("bar", new Integer(0));
        ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
        try {
            ms.updated(instance2.getInstanceName(), conf);
        } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

        // Recheck props
        fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
        fooP = (String) fooRef.getProperty("foo");
View Full Code Here

    // Configuration of baz
    Properties conf = new Properties();
    conf.put("baz", "zab");
    conf.put("foo", "oof");
    conf.put("bar", "0");
    ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
    try {
      ms.updated(instance.getInstanceName(), conf);
    } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

    // Recheck props
    fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance.getInstanceName());
    fooP = (String) fooRef.getProperty("foo");
View Full Code Here

    // Configuration of baz
    Properties conf = new Properties();
    conf.put("baz", "zab");
    conf.put("bar", new Integer(2));
    conf.put("foo", "foo");
    ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
    try {
      ms.updated(instance.getInstanceName(), conf);
    } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

    // Recheck props
    fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance.getInstanceName());
    fooP = (String) fooRef.getProperty("foo");
View Full Code Here

        // Configuration of baz
        Properties conf = new Properties();
        conf.put("baz", "zab");
        conf.put("bar", new Integer(2));
        conf.put("foo", "foo");
        ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
        try {
            ms.updated(instance2.getInstanceName(), conf);
        } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

        // Recheck props
        fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
        fooP = (String) fooRef.getProperty("foo");
View Full Code Here

      // Configuration of baz
      Properties conf = new Properties();
      conf.put("baz", "zab");
      conf.put("foo", "oof");
      conf.put("bar", new Integer(0));
      ManagedServiceFactory ms = (ManagedServiceFactory) getContext().getService(msRef);
      try {
        ms.updated(instance.getInstanceName(), conf);
      } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }

      // Recheck props
      fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance.getInstanceName());
      fooP = (String) fooRef.getProperty("foo");
View Full Code Here

TOP

Related Classes of org.osgi.service.cm.ManagedServiceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.