Examples of disableComponent()


Examples of org.apache.felix.scr.impl.BundleComponentActivator.disableComponent()

    public void disableComponent( String name )
    {
        BundleComponentActivator activator = m_componentManager.getActivator();
        if ( activator != null )
        {
            activator.disableComponent( name );
        }
    }


    public ServiceReference<S> getServiceReference()
View Full Code Here

Examples of org.apache.felix.scr.impl.BundleComponentActivator.disableComponent()

    public void disableComponent( String name )
    {
        BundleComponentActivator activator = m_componentManager.getActivator();
        if ( activator != null )
        {
            activator.disableComponent( name );
        }
    }


    public ServiceReference<S> getServiceReference()
View Full Code Here

Examples of org.osgi.service.component.ComponentContext.disableComponent()

                active = false;
                final ComponentContext ctx = componentContext;
                if ( ctx  != null ) {
                    final String name = (String) componentContext.getProperties().get(
                            ComponentConstants.COMPONENT_NAME);
                    ctx.disableComponent(name);
                }
            }
            while (active) {
                runOneCycle();
            }
View Full Code Here

Examples of org.osgi.service.component.ComponentContext.disableComponent()

            }
        };
        ctxA.addServiceListener(listener);

        ComponentContext ccA1 = srvA.getServiceA1().getComponentContext();
        ccA1.disableComponent(ServiceA1.class.getName());

        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));

        ServiceReference<ServiceA> srefA = ctxA.getServiceReference(ServiceA.class);
        Assert.assertNull("ServiceReference null", srefA);
View Full Code Here

Examples of org.osgi.service.component.ComponentContext.disableComponent()

            // deactivate
            if ( ctx != null ) {
                logger.info("Deactivating component {} due to errors during startup.", ctx.getProperties().get(Constants.SERVICE_ID));
                final String name = (String) componentContext.getProperties().get(
                    ComponentConstants.COMPONENT_NAME);
                ctx.disableComponent(name);
            }
        }
        while ( this.running ) {
            // so let's wait/get the next job from the queue
            EventInfo info = null;
View Full Code Here

Examples of org.osgi.service.component.ComponentContext.disableComponent()

            }
        };
        ctxA.addServiceListener(listener);

        ComponentContext ccA1 = srvA.getServiceA1().getComponentContext();
        ccA1.disableComponent(ServiceA1.class.getName());

        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));

        ServiceReference<ServiceA> srefA = ctxA.getServiceReference(ServiceA.class);
        Assert.assertNull("ServiceReference null", srefA);
View Full Code Here

Examples of org.osgi.service.component.ComponentContext.disableComponent()

            }
        };
        ctxA.addServiceListener(listener);

        ComponentContext ccA1 = srvA.getServiceA1().getComponentContext();
        ccA1.disableComponent(ServiceA1.class.getName());

        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));

        ServiceReference<ServiceA> srefA = ctxA.getServiceReference(ServiceA.class);
        Assert.assertNull("ServiceReference null", srefA);
View Full Code Here

Examples of org.osgi.service.component.ComponentContext.disableComponent()

            bootConfig.getComponentContext().getBundleContext().addServiceListener(listener, filter);

            // Disable the BootstrapConfiguration component
            LOGGER.debug("Disable BootstrapConfiguration");
            ComponentContext componentContext = bootConfig.getComponentContext();
            componentContext.disableComponent(BootstrapConfiguration.COMPONENT_NAME);

            if (!unregisterLatch.await(30, TimeUnit.SECONDS))
                throw new TimeoutException("Timeout for unregistering BootstrapConfiguration service");

            // Do the cleanup
View Full Code Here

Examples of org.osgi.service.component.runtime.ServiceComponentRuntime.disableComponent()

  protected void disableAndCheck(ComponentDescriptionDTO cd) throws InvocationTargetException, InterruptedException {
    ServiceComponentRuntime scr = scrTracker.getService();
        if ( scr != null )
        {
          scr.disableComponent(cd).getValue();
          Assert.assertFalse("Expected component disabled", scr.isComponentEnabled(cd));
        }
        else
        {
          throw new NullPointerException("no ServiceComponentRuntime");
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.