202.8. ユースケース
次のルートは、ユーザーのプロファイルを取得します。
from("direct:foo")
.to("linkedin://people/person");
from("direct:foo")
.to("linkedin://people/person");
次のルートは、ユーザーの接続を 30 秒ごとにポーリングします。
from("linkedin://people/connections?consumer.timeUnit=SECONDS&consumer.delay=30")
.to("bean:foo");
from("linkedin://people/connections?consumer.timeUnit=SECONDS&consumer.delay=30")
.to("bean:foo");
次のルートでは、動的ヘッダーオプションを持つプロデューサーを使用します。 personId ヘッダーには LinkedIn の個人 ID が含まれているため、次のように CamelLinkedIn.person_id ヘッダーに割り当てられます。
from("direct:foo")
.setHeader("CamelLinkedIn.person_id", header("personId"))
.to("linkedin://people/connectionsById")
.to("bean://bar");
from("direct:foo")
.setHeader("CamelLinkedIn.person_id", header("personId"))
.to("linkedin://people/connectionsById")
.to("bean://bar");