327.4. Producer エンドポイントとしての使用

SSH コンポーネントがプロデューサー (.to ("ssh://…")) として使用される場合、リモート SSH サーバーで実行するコマンドとしてメッセージボディーが送信されます。

XML DSL 内での例を次に示します。コマンドには、XML エンコードされた改行 (
) があることに注意してください。

<route id="camel-example-ssh-producer">
  <from uri="direct:exampleSshProducer"/>
  <setBody>
    <constant>features:list&#10;</constant>
  </setBody>
  <to uri="ssh://karaf:karaf@localhost:8101"/>
  <log message="${body}"/>
</route>