0
駱駝documentation for Message Filter過濾豆顯示了使用「過濾豆」,像這樣幾個Java DSL例子:如何使用駱駝的消息在Spring XML
from("direct:start")
.filter().method(MyBean.class, "isGoldCustomer").to("mock:result").end()
.to("mock:end");
public static class MyBean {
public boolean isGoldCustomer(@Header("level") String level) {
return level.equals("gold");
}
}
但該網頁不展示如何調用該豆在Spring XML:
<route id="my-route">
<from uri="direct:a" />
<filter>
<method>??? how to call MyBean#isGoldCustomer from here???</method>
<to uri="direct:b" />
</filter>
</route>
在上面的代碼中,我該如何電線我<filter/>
一個Java bean,什麼接口,這是否的Java bean需要執行/擴展?