Java 类org.apache.camel.RoutingSlip 实例源码

项目:camelinaction2    文件:SlipBean.java   
@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;
}
项目:camelinaction    文件:SlipBean.java   
@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;
}
项目:camel-cookbook-examples    文件:RoutingSlipAnnotated.java   
@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;
}
项目:t4f-data    文件:SlipBean.java   
@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;
}
项目:Camel    文件:RoutingSlipPOJOTest.java   
@RoutingSlip(context = "camel-1")
public String[] doSomething(String body) {
    return new String[]{"mock:foo", "direct:b", "mock:result"};
}
项目:Camel    文件:AsyncEndpointRoutingSlipBean2Test.java   
@RoutingSlip
public String doSomething() {
    return "async:bye:camel,async:bye:world";
}
项目:Camel    文件:AsyncEndpointRoutingSlipBean3Test.java   
@RoutingSlip
public String doSomething() {
    return "async:hi:world,direct:foo";
}
项目:Camel    文件:AsyncEndpointRoutingSlipBeanTest.java   
@RoutingSlip
public String doSomething() {
    return "async:bye:camel,mock:result";
}