@Override public void configure() { from("direct:primo.test") .to(ExchangePattern.InOut, "hazelcastmq:queue:primo.test"); from("hazelcastmq:queue:primo.test") .process(new StaticLogProcessor("Starting work in endpoint.")) .delay(2000) .process(new StaticLogProcessor("Finished work in endpoint.")) .setBody(constant("Goodbye World!")); } });
@Override public void configure() throws Exception { from("jms:queue:factory." + factoryType + ".inbound").routeId(factoryType + "_factory") .setHeader("name", xpath("order/type/text()")) .setHeader("id", xpath("order/id/text()")) .setHeader("amount", xpath("order/amount/text()")) .delay(constant(factoryCosts)) .setHeader(Exchange.HTTP_METHOD, constant("PUT")) .setBody(constant("")) .to("http://" + reportServerHost + ":" + reportServerPort + "/report/services/reporting"); } }
@Override public void configure() throws Exception { from("jms:queue:factory." + factoryType + ".inbound").routeId(factoryType + "_factory") .setHeader("name", xpath("order/type/text()")) .setHeader("id", xpath("order/id/text()")) .setHeader("amount", xpath("order/amount/text()")) .delay(constant(factoryCosts)) .setHeader(Exchange.HTTP_METHOD, constant("PUT")) .setBody(constant("")) .to("http://" + reportServerHost + ":" + reportServerPort + "/report/services/reporting"); } }
.to(smppUriProducer) .setBody(simple("The SMSC accepted the message" + " for ${header.CamelSmppDestAddr}" + " and assigned SMPP ID: ${header.CamelSmppId}"))
.setBody(simple("access_token=${headers.apiToken}&endpoint=https%3A%2F%2Flocation-${headers.userid}-api.amp.${headers.openshiftappurl}%3A443&api_backend=http%3A%2F%2Flocation-service.${headers.userid}.svc%3A8080&sandbox_endpoint=https%3A%2F%2Flocation-${headers.userid}-api-staging.amp.${headers.openshiftappurl}%3A443&oidc_issuer_endpoint=http%3A%2F%2F3scale-admin%3A${headers.secret}%40sso-sso.${headers.openshiftappurl}%2Fauth%2Frealms%2F${headers.userid}")) .toD("https4://${headers.userid}-admin.${headers.openshiftappurl}/admin/api/services/${headers.serviceid}/proxy.xml?sslContextParameters=#ssl&bridgeEndpoint=true") .setBody(simple("access_token=${headers.apiToken}&name=Secure&system_name=secure")) .toD("https4://${headers.userid}-admin.${headers.openshiftappurl}/admin/api/services/${headers.serviceid}/application_plans.xml?sslContextParameters=#ssl&bridgeEndpoint=true") .setHeader("planid").xpath("/plan/id", String.class) .setBody(simple("access_token=${headers.apiToken}&plan_id=${header.planid}&name=Secured+App&description=SSO+Secured+App&redirect_url=http%3A%2F%2Fwww-${headers.userid}.apps.${headers.openshiftappurl}%2F*")) .toD("https4://${headers.userid}-admin.${headers.openshiftappurl}/admin/api/accounts/${header.accountid}/applications.xml?sslContextParameters=#ssl&bridgeEndpoint=true") .setHeader("applicationid").xpath("/application/id", String.class) .setBody(simple("access_token=${headers.apiToken}&policies_config=%5B+++++%7B+++++++++%22name%22%3A+%22cors%22%2C+++++++++%22version%22%3A+%22builtin%22%2C+++++++++%22configuration%22%3A+%7B+++++++++++++%22allow_headers%22%3A+%5B+++++++++++++++++%22Authorization%22+++++++++++++%5D%2C+++++++++++++%22allow_credentials%22%3A+true%2C+++++++++++++%22allow_methods%22%3A+%5B+++++++++++++++++%22GET%22%2C+++++++++++++++++%22OPTIONS%22+++++++++++++%5D%2C+++++++++++++%22allow_origin%22%3A+%22*%22+++++++++%7D%2C+++++++++%22enabled%22%3A+true+++++%7D%2C+++++%7B+++++++++%22name%22%3A+%22apicast%22%2C+++++++++%22version%22%3A+%22builtin%22%2C+++++++++%22configuration%22%3A+%7B%7D%2C+++++++++%22enabled%22%3A+true+++++%7D+%5D")) .toD("https4://${headers.userid}-admin.${headers.openshiftappurl}/admin/api/services/${headers.serviceid}/proxy/policies.json?sslContextParameters=#ssl&bridgeEndpoint=true") .log("return----> ${body}") .setBody(simple("access_token=${headers.apiToken}&http_method=GET&pattern=%2Flocations&delta=2&metric_id=${headers.metricid}")) .toD("https4://${headers.userid}-admin.${headers.openshiftappurl}/admin/api/services/${headers.serviceid}/proxy/mapping_rules.xml?sslContextParameters=#ssl&bridgeEndpoint=true") .setHeader("metricid").xpath("/metrics/metric/id", String.class)