Examples of stop()


Examples of org.apache.camel.ProducerTemplate.stop()

    public void sendBody(String endpointUri, Object body) throws Exception {
        ProducerTemplate template = context.createProducerTemplate();
        try {
            template.sendBody(endpointUri, body);
        } finally {
            template.stop();
        }
    }

    public void sendStringBody(String endpointUri, String body) throws Exception {
        sendBody(endpointUri, body);
View Full Code Here

Examples of org.apache.camel.Service.stop()

            return;
        }
        if (value instanceof Service) {
            Service service = (Service)value;
            LOG.trace("Stopping service {}", value);
            service.stop();
        } else if (value instanceof Collection) {
            stopServices((Collection<?>)value);
        }
    }
View Full Code Here

Examples of org.apache.camel.api.management.mbean.ManagedRouteMBean.stop()

        assertEquals("direct://start", mbean.getEndpointUri());

        // should be started
        assertEquals("Should be started", ServiceStatus.Started.name(), mbean.getState());

        mbean.stop();

        // should be stopped
        assertEquals("Should be stopped", ServiceStatus.Stopped.name(), mbean.getState());
    }
View Full Code Here

Examples of org.apache.camel.component.salesforce.internal.SalesforceSession.stop()

            } catch (Exception ignore) {
            }

            // Salesforce session stop
            try {
                session.stop();
            } catch (Exception ignore) {
            }

            // release HttpConnections
            try {
View Full Code Here

Examples of org.apache.camel.example.jms.JmsBroker.stop()

            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
}
View Full Code Here

Examples of org.apache.camel.impl.ConsumerCache.stop()

        assertEquals(0, current.intValue());

        // stop the consumer as it was purged from the cache
        // so we need to manually stop it
        consumer.stop();
        cache.stop();
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

Examples of org.apache.camel.impl.DefaultCamelContext.stop()

        CamelContext context = new DefaultCamelContext();
        context.addComponent("properties", new PropertiesComponent("sampleconfig.properties"));
        context.addRoutes(new OrderRouteBuilder());
        context.start();
        System.in.read();
        context.stop();
    }
   
    public static void main(String[] args) throws Exception {
        new Starter().run();
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducerTemplate.stop()

        for (int i = 0; i < 20; i++) {
            String out = (String) replies.get(i).get();
            assertTrue(out.startsWith("Bye"));
        }

        pt.stop();
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

Examples of org.apache.camel.impl.DefaultUnitOfWork.stop()

                    // since they will likely update the exchange with
                    // some final results.
                    callback.done(sync);
                    exchange.getUnitOfWork().done(exchange);
                    try {
                        uow.stop();
                    } catch (Exception e) {
                        throw wrapRuntimeCamelException(e);
                    }
                    exchange.setUnitOfWork(null);
                }
View Full Code Here

Examples of org.apache.camel.loanbroker.webservice.version.bank.BankServer.stop()

        // Start the loan broker
        Thread.sleep(5 * 60 * 1000);
        context.stop();
        Thread.sleep(1000);
        bankServer.stop();
        creditAgencyServer.stop();
    }
    //END SNIPPET: server
    /**
     * Lets configure the Camel routing rules using Java code...
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.