@Override public void configure() throws Exception { from("servlet:hello") .transform().constant("Hello from foo server on port 8081"); } }
@Override public void configure() throws Exception { from("jetty:http://localhost:8080/hello") .transform().simple("Hello from Camel"); } }
@Override public void configure() throws Exception { from("jetty:http://0.0.0.0:8080/ping").transform(constant("PONG\n")); }
@Override public void configure() throws Exception { from("jetty:http://0.0.0.0:8080/ping").transform(constant("PONG\n")); }
@Override public void configure() throws Exception { from("jetty:http://localhost:8080/hello") .transform().simple("Hello from Camel"); } }
@Override public void configure() throws Exception { from("servlet:hello") .transform().constant("Hello from bar server on port 8082"); } }
@Override public void configure() throws Exception { from("direct:start").transform(body().prepend("Hello ")); } });
@Override public void configure() { from("timer:trigger?delay=500") .transform().simple("ref:myBean") .to("log:out"); }
@Override public void doConfigure() throws Exception { from("servlet:///ping?servletName=" + CAMEL_SERVLET) .routeId(ROUTE_ID_PING) .log(LoggingLevel.INFO, "Incoming PING request ... ") .transform(constant("PONG\n")); } }
@Override public void configure() throws Exception { // define a Camel REST service using the rest-dsl // where we define a GET /hello as a service that routes to the hello route // we will cover rest-dsl in chapter 10 rest("/").produces("text/plain") .get("hello") .to("direct:hello"); from("direct:hello") .to("geocoder:address:current") .transform().simple("Hello from Spring Boot and Camel. We are at: ${body}"); } }
@Override public void doConfigure() throws Exception { VersionInfo filter = new VersionInfo(VersionPrinter.APPLICATION_NAME, null, null, null, null); final VersionInfo[] versions = versionInfoSource.getVersionInformation(filter); String versionStr = "N/A"; if (versions.length > 0) { versionStr = versions[0].getFullVersion() + " (" + versions[0].getDate() + ")"; } from("servlet:///version?servletName=" + RouteConstants.CAMEL_SERVLET) .routeId(ROUTE_ID_VERSION) .transform(constant(versionStr)); } }
@Override public void configure() throws Exception { // HTTP service fromF("jetty:http://localhost:" + port) // increase the atomic clustered counter from the hazelcast cache .setHeader(HazelcastConstants.OBJECT_ID, constant("myCounter")) .to("hazelcast:atomicvalue:Cache?hazelcastInstance=#hz&defaultOperation=increment") // prepare http response .log(name + ": counter is now ${body}") .setHeader(Exchange.CONTENT_TYPE, constant("text/plain")) .transform().simple("Atomic Counter is now ${body}\n"); }
public void configure() { from("timer:foo?period=5000&synchronous=true") .transform(simple("${random(1000)}")) .choice() .when(simple("${body} > 500")) .log("High number ${body}") .to("mock:high") .otherwise() .log("Low number ${body}") .to("mock:low"); }
@Override public void configure() throws Exception { // this is the webservice route which is started last from("cxf:bean:inventoryEndpoint") .routeId("webservice").startupOrder(2) .to("direct:update") .transform().method("inventoryService", "replyOk"); // this is the shared route which then must be started first from("direct:update") .routeId("update").startupOrder(1) .to("bean:inventoryService?method=updateInventory"); } }
@Override public void configure() throws Exception { from("direct:input") .toF("mhd-iti67:localhost:%d", FhirTestContainer.DEMO_APP_PORT); from("mhd-iti67:translation?audit=true") .errorHandler(noErrorHandler()) .transform(new Iti67Responder()); }
@Override public void configure() throws Exception { from("direct:input") .toF("mhd-iti66:localhost:%d", FhirTestContainer.DEMO_APP_PORT); from("mhd-iti66:translation?audit=true") .errorHandler(noErrorHandler()) .transform(new Iti66Responder()); }
@Override public void configure() throws Exception { from("direct:input") .toF("mhd-iti66:localhost:%d", FhirTestContainer.DEMO_APP_PORT); from("mhd-iti66:translation?audit=true") .errorHandler(noErrorHandler()) .transform(new Iti66Responder()); }
@Override public void configure() throws Exception { from("direct:input") .toF("mhd-iti67:localhost:%d?fhirContext=#fhirContext", FhirTestContainer.DEMO_APP_PORT); from("mhd-iti67:translation?audit=true&fhirContext=#fhirContext") .errorHandler(noErrorHandler()) .transform(new Iti67Responder()); }
@Override public void configure() throws Exception { from("direct:input") .setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.GET)) .toF("http4:localhost:%d", StandardTestContainer.DEMO_APP_PORT); from("mhd-iti68:download?audit=true") .errorHandler(noErrorHandler()) .transform(new Iti68Responder()); }
@Override public void configure() throws Exception { from("direct:input") .toF("mhd-iti65:localhost:%d", FhirTestContainer.DEMO_APP_PORT); from("mhd-iti65:stub?audit=true") .errorHandler(noErrorHandler()) .setHeader(VALIDATION_MODE, constant(SCHEMA | MODEL)) .process(itiRequestValidator()) .transform(new Responder()); }