Package org.osgi.service.cm

Examples of org.osgi.service.cm.ManagedServiceFactory.updated()


    p3.put("boolean", new Boolean(true));
    p3.put("string", new String("foo"));
    p3.put("strAProp", new String[] {"foo", "bar", "baz"});
    p3.put("intAProp", new int[] { 1, 2, 3});
    try {
      fact.updated("FooProvider-3", p3);
    } catch (ConfigurationException e) {
      fail("Unable to reconfigure the instance with : " + p3);
    }
   
    sr = helper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-3");
View Full Code Here


      p3.put("boolean", "true");
      p3.put("string", "foo");
      p3.put("strAProp", "{foo, bar, baz}");
      p3.put("intAProp", "{ 1, 2, 3}");
      try {
        fact.updated("FooProvider-3", p3);
      } catch (ConfigurationException e) {
        fail("Unable to reconfigure the instance with : " + p3);
      }
     
      sr = helper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-3");
View Full Code Here

        p3.put("boolean", "true");
        p3.put("string", "foo");
        p3.put("strAProp", "{foo, bar, baz}");
        p3.put("intAProp", "{ 1, 2, 3}");
      try {
        fact.updated("FooProvider-3", p3);
      } catch (ConfigurationException e) {
        fail("Unable to reconfigure the instance with : " + p3);
      }
     
      sr = helper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-3");
View Full Code Here

    p.put("string", "absdir");
    p.put("strAProp", new String[] {"a"});
    p.put("intAProp", new int[] {1,2});
   
    try {
      f.updated("ok2", p);
      ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
      assertNotNull("Check instance creation", ref);
      f.deleted("ok2");
      ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
      assertNull("Check instance deletion", ref);
View Full Code Here

        p.put("string", "absdir");
        p.put("strAProp", "{a}");
        p.put("intAProp", "{1,2}");
       
        try {
            f.updated("ok2", p);
            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
            assertNotNull("Check instance creation", ref);
            f.deleted("ok2");
            ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
            assertNull("Check instance deletion", ref);
View Full Code Here

    p.put("string", "absdir");
    p.put("strAProp", new String[] {"a"});
    p.put("intAProp", new int[] {1,2});
   
    try {
      f.updated("okkkk", p);
      ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
      assertNotNull("Check instance creation", ref);
      p.put("int", new Integer("4"));
      f.updated("okkkk", p);
      ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
View Full Code Here

    try {
      f.updated("okkkk", p);
      ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
      assertNotNull("Check instance creation", ref);
      p.put("int", new Integer("4"));
      f.updated("okkkk", p);
      ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
      Integer test = (Integer) ref.getProperty("int");
      assertEquals("Check instance modification", 4, test.intValue());
      f.deleted("okkkk");
      ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
View Full Code Here

      p.put("string", "absdir");
      p.put("strAProp", "{a}");
      p.put("intAProp", "{1,2}");
     
      try {
        f.updated("okkkk", p);
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
        assertNotNull("Check instance creation", ref);
        p.put("int", new Integer("4"));
        f.updated("okkkk", p);
        ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
View Full Code Here

      try {
        f.updated("okkkk", p);
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
        assertNotNull("Check instance creation", ref);
        p.put("int", new Integer("4"));
        f.updated("okkkk", p);
        ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
        Integer test = (Integer) ref.getProperty("int");
        assertEquals("Check instance modification", 4, test.intValue());
        f.deleted("okkkk");
        ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
View Full Code Here

                    String pid = (String) dictionary.get(
                            FrameworkConstants.SERVICE_PID);

                    try {
                        factory.updated(pid,
                                new CaseInsensitiveDictionary(dictionary));
                    } catch (ConfigurationException e) {
                        log.log(reference, LogService.LOG_ERROR,
                                "updated(" + pid + ", " + dictionary +
                                        ") method failed:",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.