4.4. データの書き込みまたは読み取りのための 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>