Package io.fabric8.mq.fabric

Examples of io.fabric8.mq.fabric.FabricDiscoveryAgent.stop()


            assertTrue(ssh1.isAlive());
            createAndAssertChildContainer(fabricService, "ssh2", "ssh1", "default");

            //Stop & Start Remote Child
            Container ssh2 = fabricService.getContainer("ssh2");
            ssh2.stop();
            assertFalse(ssh2.isAlive());
            ssh2.start();
            Provision.containersStatus(Arrays.asList(ssh2), "success", PROVISION_TIMEOUT);
            assertTrue(ssh2.isAlive());
            ssh2.stop();
View Full Code Here


            ssh2.stop();
            assertFalse(ssh2.isAlive());
            ssh2.start();
            Provision.containersStatus(Arrays.asList(ssh2), "success", PROVISION_TIMEOUT);
            assertTrue(ssh2.isAlive());
            ssh2.stop();

            //Try stopping and starting the remote container.
            ssh1.stop();
            assertFalse(ssh1.isAlive());
            System.out.println(executeCommand("fabric:container-list -v"));
View Full Code Here

            }

            Container found = FabricCommand.getContainer(fabricService, containerName);
            applyUpdatedCredentials(found);
            if (found.isAlive()) {
                found.stop(force);
                System.out.println("Container '" + found.getId() + "' stopped successfully.");
            } else {
                System.err.println("Container '" + found.getId() + "' already stopped.");
            }
        }
View Full Code Here

                break;
            }
            Container container = sorted.get(i);
            stoppingContainerIds.add(container.getId());
            profileStatus.stoppingContainers(stoppingContainerIds);
            container.stop(true);

        }
    }

View Full Code Here

            FabricService fabricService = fabricProxy.getService();
            for (Container aux : containers) {
                try {
                    //We want to use the latest metadata
                    Container updated = fabricService.getContainer(aux.getId());
                    updated.stop(true);
                } catch (Exception ex) {
                    ex.printStackTrace(System.err);
                    //noop
                }
            }
View Full Code Here

    public void stopContainer(Container container, boolean force) {
        assertValid();
        LOGGER.info("Stopping container {}", container.getId());
        ContainerProvider provider = getProvider(container);
        try {
            provider.stop(container);
        } catch (RuntimeException ex) {
            // if its already stopped then ignore the exception
            boolean stopped = "Instance already stopped".equals(ex.getMessage());
            if (!stopped) {
                throw ex;
View Full Code Here

        boolean invalidContainer = false;
        try {
            ContainerProvider provider = getProvider(container, true);
            if (provider != null) {
                try {
                    provider.stop(container);
                } catch (Exception ex) {
                    // Ignore error while stopping and try to destroy.
                    // and if its already stopped then ignore the exception and do not rethrow later
                    boolean stopped = "Instance already stopped".equals(ex.getMessage());
                    if (!stopped) {
View Full Code Here

                        if (state != null) {
                            for (Object id : state.inflight) {
                                onFailure(id, new IOException("Transport stopped"));
                            }
                        }
                        transport.stop(coutDown);
                    }
                }
            });
        } else {
            onComplete.run();
View Full Code Here

            }

        }
        finally {
            server.stop();
            client.stop();
        }
    }

    public static interface Hello {
        void hello(String name, AsyncCallback<String> callback) throws Exception;
View Full Code Here

            assertEquals("Hello Hiram Async!", future2.get(2, TimeUnit.SECONDS).getValue());

        }
        finally {
            server.stop();
            client.stop();
        }
    }

    @Test
    public void testOverflowAsync() throws Exception {
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.