org.apache.cxf.endpoint.Client.setThreadLocalRequestContext()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(276)

本文整理了Java中org.apache.cxf.endpoint.Client.setThreadLocalRequestContext()方法的一些代码示例,展示了Client.setThreadLocalRequestContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Client.setThreadLocalRequestContext()方法的具体详情如下:
包路径:org.apache.cxf.endpoint.Client
类名称:Client
方法名:setThreadLocalRequestContext

Client.setThreadLocalRequestContext介绍

[英]Sets whether the request context is thread local or global to this client. By default, the request context is "global" in that any values set in the context are seen by all threads using this client. If set to true, the context is changed to be a ThreadLocal and values set are not seen by other threads.
[中]设置此客户端的请求上下文是线程本地上下文还是全局上下文。默认情况下,请求上下文是“全局”的,因为使用此客户端的所有线程都可以看到上下文中设置的任何值。如果设置为true,则上下文将更改为ThreadLocal,并且其他线程看不到设置的值。

代码示例

代码示例来源:origin: org.mule.modules/mule-module-cxf

addInterceptors(client.getOutFaultInterceptors(), outFaultInterceptors);
client.setThreadLocalRequestContext(true);

代码示例来源:origin: org.apache.servicemix/servicemix-cxf-se

ClientProxy.getClient(proxy).setThreadLocalRequestContext(true);
if (isPropagateSecuritySubject()) {
  jbiTransportFactory.setDeliveryChannel(new PropagateSecuritySubjectDeliveryChannel(jbiTransportFactory.getDeliveryChannel()));

代码示例来源:origin: org.switchyard.components/switchyard-component-soap

client.setThreadLocalRequestContext(true);
if (_feature.isAddressingEnabled()) {

相关文章