Examples of stop()


Examples of org.apache.felix.framework.Felix.stop()

        getLog().info("Runner Service available");

        invokeRun(runner, felix.getBundleContext());

        try {
            felix.stop();
            felix.waitForStop(5000);
            // Delete felix-cache
            File cache = new File(m_targetDir.getAbsolutePath() + "/felix-cache");
            cache.delete();
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentFactory.stop()

        // Create and try to start the factory
        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
        try {
            fact.start();
            // Should not be executed
            fact.stop();
            fail("The factory must not start when unknown data type is specified.");
        } catch (IllegalStateException e) {
            // OK
        } finally {
            // Restore the original state of the subscriber
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.stop()

        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
        assertTrue("Check invocation", cs.check());

        provider.stop();
        provider.dispose();
        under.stop();
        under.dispose();
    }

    @Test
    public void testMultipleNoDelay() {
View Full Code Here

Examples of org.apache.felix.ipojo.HandlerManagerFactory.stop()

        Architecture arch = (Architecture) getContext().getService(sr_arch);
        assertEquals("Check validity", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
       
        // Kill the handler factory
        HandlerManagerFactory f = (HandlerManagerFactory) Utils.getHandlerFactoryByName(getContext(), "check");
        f.stop();
       
        sr = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "HandlerTest-1");
        assertNull("Check the check service unavailability", sr);
       
        sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
View Full Code Here

Examples of org.apache.felix.ipojo.api.PrimitiveComponentType.stop()

        ComponentInstance ci = type.createInstance();

        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

        // Stop cons
        cons.stop();
        assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));

        // Restart cons
        cons.start();
        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
View Full Code Here

Examples of org.apache.felix.ipojo.api.SingletonComponentType.stop()

        ci = type.create();
        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
                .getName(), ci.getInstanceName());
        assertThat(ref, is(notNullValue()));
        type.stop();
        assertThat("Ci is disposed", ci.getState(),
                is(ComponentInstance.DISPOSED));
        assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
                .getInstanceName()), is(false));
    }
View Full Code Here

Examples of org.apache.felix.ipojo.composite.util.SourceManager.stop()

     * @see org.apache.felix.ipojo.composite.CompositeHandler#stop()
     */
    public void stop() {
        for (int i = 0; m_sources != null && i < m_sources.size(); i++) {
            SourceManager source = (SourceManager) m_sources.get(i);
            source.stop();
        }

        for (int i = 0; i < m_instances.size(); i++) {
            SvcInstance inst = (SvcInstance) m_instances.get(i);
            inst.stop();
View Full Code Here

Examples of org.apache.felix.karaf.admin.Instance.stop()

    private boolean stopInstance(String name) {
        try {
            Instance instance = adminService.getInstance(name);
            if (instance != null) {
                instance.stop();
                return true;
            }
        } catch (Exception ex) {
            Logger.getLogger(AdminPlugin.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

Examples of org.apache.felix.karaf.shell.commands.utils.PumpStreamHandler.stop()

        int status = p.waitFor();


        log.info("Process exited w/status: {}", status);

        handler.stop();

        return null;
    }

}
View Full Code Here

Examples of org.apache.flink.client.LocalExecutor.stop()

      executor.setTaskManagerNumSlots(DOP);
      executor.start();
     
      executor.executePlan(wc.getPlan(new Integer(DOP).toString(), inFile.toURI().toString(),
          outFile.toURI().toString()));
      executor.stop();
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail(e.getMessage());
    }
   
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.