@RoutingSlip public String slip(String body) { // always include A String answer = "mock:a"; // extra step if we are cool if (body.contains("Cool")) { answer += ",mock:b"; } // and always include C as well answer += ",mock:c"; return answer; }
@Consume(uri = "direct:start") @RoutingSlip(delimiter = ",") public List<String> routeMe(String body, @Headers Map<String, Object> headers) { ArrayList<String> results = new ArrayList<String>(); Object slip = headers.get("myRoutingSlipHeader"); if (slip != null) { String[] uris = slip.toString().split(","); Collections.addAll(results, uris); } results.add("mock:oneMore"); return results; }
@RoutingSlip(context = "camel-1") public String[] doSomething(String body) { return new String[]{"mock:foo", "direct:b", "mock:result"}; }
@RoutingSlip public String doSomething() { return "async:bye:camel,async:bye:world"; }
@RoutingSlip public String doSomething() { return "async:hi:world,direct:foo"; }
@RoutingSlip public String doSomething() { return "async:bye:camel,mock:result"; }