Package org.osgi.service.cm

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


   
    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);
    } catch (ConfigurationException e) {
      fail("An acceptable configuration is rejected : " + e.getMessage());
    }
View Full Code Here


       
        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);
        } catch (ConfigurationException e) {
            fail("An acceptable configuration is rejected : " + e.getMessage());
        }
View Full Code Here

      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");
      assertNull("Check instance deletion", ref);
    } catch (ConfigurationException e) {
      fail("An acceptable configuration is rejected : " + e.getMessage());
    }
View Full Code Here

        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");
        assertNull("Check instance deletion", ref);
      } catch (ConfigurationException e) {
        fail("An acceptable configuration is rejected : " + e.getMessage());
      }
View Full Code Here

                    return;
                }


                try {
                    factory.deleted(pid);
                } catch (Throwable throwable) {
                    log.log(reference, LogService.LOG_ERROR,
                            "deleted(" + pid + ") method failed:",
                            throwable);
                }
View Full Code Here

                // success
            }
        }
        {
            try {
                sf.deleted(null);
                fail("An Exception should have been thrown");
            } catch (IllegalArgumentException iae) {
                // success
            }
        }
View Full Code Here

        {
            if ( configs.removeConfiguration( configPid, factoryPid ) )
            {
                try
                {
                    service.deleted( configPid.toString() );
                    configs.record( configPid, factoryPid, -1 );
                }
                catch ( Throwable t )
                {
                    this.handleCallBackError( t, reference, configPid );
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.