2015-05-19 31 views
3

我想要設置一些屬性到端點如下。 (),to()。setProperty(timeout,constant(12));如何使用setter將屬性設置爲Apache Camel中的端點?

如上所述使用setProperty,它將屬性設置爲交換/消息對象? 如何在端點本身檢索該屬性或如何爲端點設置它(而不是通過在URI中傳遞它)?

我知道我們可以將它傳遞給端點URI。但只是想知道是否有一種方法可以解決setter的幫助。

回答

3

如果你想屬性設置您的端點,你可以這樣做以下:

CxfEndpoint endpoint = (CxfEndpoint) new CxfComponent(this.getContext()).createEndpoint(<uri>); 
endpoint.setxxx // here you can configure your endpoint with setters 

from(endpoint)... 
+0

感謝您的回答:) –

+0

如果你認爲答案是有益,可以請你接受嗎? – soilworker

相關問題