4.5. データの書き込みまたは読み取りのための URI の設定

以下のルートでは、Camel は指定された websocket 接続に書き込みます。

from("direct:start")
        .to("ahc-ws://targethost");

同等の Spring の例:

<camelContext xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from uri="direct:start"/>
    <to uri="ahc-ws://targethost"/>
  </route>
</camelContext>

以下のルートでは、Camel は指定された websocket 接続から読み取ります。

from("ahc-ws://targethost")
        .to("direct:next");

同等の Spring の例:

<camelContext xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from uri="ahc-ws://targethost"/>
    <to uri="direct:next"/>
  </route>
</camelContext>