Package org.osgi.service.component

Examples of org.osgi.service.component.ComponentInstance.dispose()


        log.log(LogService.LOG_WARNING, "Bound Services: " +  SimpleComponent.INSTANCE.m_multiRef);
        TestCase.assertFalse( SimpleComponent.INSTANCE.m_multiRef.contains( s1 ) );
        TestCase.assertTrue( SimpleComponent.INSTANCE.m_multiRef.contains( s2 ) );

        instance.dispose();
        TestCase.assertNull( SimpleComponent.INSTANCE );
        TestCase.assertNull( instance.getInstance() ); // SCR 112.12.6.2
       
        s2.drop();
        s1.drop();
View Full Code Here


    @SuppressWarnings("unchecked")
    final F instance = (F) instanceWrapper.getInstance();
    if (instance == null) {
      log.error("instance == null", new Exception(factoryId));
      instanceWrapper.dispose();
      return null;
    }

    final String instanceId;
View Full Code Here

    try {
      instanceId = instance.getInstanceId();
    } catch (final Exception e) {
      log.error("invalid instanceId", new Exception(factoryId));
      instanceWrapper.dispose();
      return null;
    }

    if (instanceId == null) {
      log.error("instanceId == null", new Exception(factoryId));
View Full Code Here

      return null;
    }

    if (instanceId == null) {
      log.error("instanceId == null", new Exception(factoryId));
      instanceWrapper.dispose();
      return null;
    }

    if (instanceMap.containsKey(instanceId)) {
      log.error("duplicate instance id", new Exception(instanceId));
View Full Code Here

      return null;
    }

    if (instanceMap.containsKey(instanceId)) {
      log.error("duplicate instance id", new Exception(instanceId));
      instanceWrapper.dispose();
      return null;
    }

    instanceMap.put(instanceId, instanceWrapper);
View Full Code Here

    if (instance == null) {
      log.error("instance == null", new Exception(instanceId));
      return false;
    }

    instanceWrapper.dispose();

    log.debug("destroyed : {}", fidget);

    return true;
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.