繁体   English   中英

如何使用setter在Apache Camel中将属性设置为端点?

[英]How to Set properties to endpoint in Apache Camel using setters?

我想将一些属性设置为Endpoint,如下所示。

从()到()的setProperty(超时,常数(12))。。

如上所述使用setProperty,它是否为交换/消息对象设置属性? 如何在端点本身中检索此属性或如何为端点设置它(不是通过在URI中传递它)?

我知道我们可以将它传递给端点URI。 但只是想知道是否有办法帮助安装者。

如果要将属性设置为from-endpoint,可以执行以下操作:

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

from(endpoint)...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM