291.5. 示例

设置每 60 秒生成事件的路由:

from("scheduler://foo?delay=60s").to("bean:myBean?method=someMethodName");

以上路由将生成事件,然后在 Registry 中调用名为 myBeansomeMethodName 方法,如 JNDI 或 Spring。

Spring DSL 中的路由:

<route>
  <from uri="scheduler://foo?delay=60s"/>
  <to uri="bean:myBean?method=someMethodName"/>
</route>