Package org.osgi.service.cm

Examples of org.osgi.service.cm.ManagedServiceFactory


        // 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

        // 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

    conf.put("baz", "zab");
    conf.put("foo", "foo");
    conf.put("bar", new Integer(2));
    conf.put("propagated1", "propagated");
    conf.put("propagated2", new Integer(1));
    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

        conf.put("baz", "zab");
        conf.put("foo", "foo");
        conf.put("bar", new Integer(2));
        conf.put("propagated1", "propagated");
        conf.put("propagated2", new Integer(1));
        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

    reconf.put("int", new Integer(5));
    reconf.put("long", new Long(43));
    reconf.put("string", new String("toto"));
    reconf.put("strAProp", new String[] {"foo", "baz"});
    reconf.put("intAProp", new int[] {3, 2, 1});
    ManagedServiceFactory fact = (ManagedServiceFactory) getServiceObject(fact_ref);
    try {
      fact.updated("FooProvider-1", reconf);
    } catch (ConfigurationException e) {
      fail("Configuration non acceptable : " + reconf);
    }

    sr = helper.getServiceReferenceByName( FooService.class.getName(), "FooProvider-1");
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.