0
我試圖調用使用駱駝代理和Java接口的直接端點。我將這個接口作爲OSGI服務公開給另一個包並訪問該包中的接口。一切正常,現在我需要調用另一個直接端點基於相同的駱駝上下文使用相同的接口的特定條件。我怎樣才能做到這一點?多駱駝Proxys在同一駱駝方面
Camel routes:
<camelContext id="cContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
<proxy id="camelProxyService"
serviceInterface="com.xxx.CamelProxyService"
serviceUrl="direct:endpoint1" />
<route id="route1">
<from uri="direct:endpoint1" />
<to uri="seda:a" />
</route>
<route id="route2">
<from uri="direct:endpoint2" />
<to uri="seda:b" />
</route>
</camelContext>
<service ref="camelProxyService" interface="com.xxx.CamelProxyService"/>
public interface CamelProxyService {
public void method1(String str);
public void method2(String str);
}
How can i define the interface as camel proxy in camel context and mention method names to call different direct endpoints? Any help is appreciated.