我想在Apache Camel 2.19.x中使用新的Connector策略,以便使用Restlet Producer根據計劃連接到JasperServer實例以下載某些報告。Apache Camel Restlet Producer Connector
基本上我想要做的是什麼轉換如下: -
from("timer://runOnce?repeatCount=1&delay=5000") .setHeader(RestletConstants.RESTLET_LOGIN).simple("jasperadmin") .setHeader(RestletConstants.RESTLET_PASSWORD).simple("jasperadmin") .to("restlet:http://localhost:8181/jasperserver/rest_v2/reports/reports/interactive/MapReport.pdf?restletMethods=get").to("file:C:/tmp/camel")
到
from("jasper-server").to("file:C:/tmp/camel")
的問題是,RestletComponent設置在默認情況下,我的RestletConsumer我不知道如何使用組件選項將其設置爲Producer模式,或者我是否應該使用SchedulerComponent作爲我的基礎,然後以某種方式集成Restlet功能y進入組件。相反,使用HttpComponent作爲基本組件會更好嗎?