本文整理汇总了Java中org.apache.cxf.Bus.setExtension方法的典型用法代码示例。如果您正苦于以下问题:Java Bus.setExtension方法的具体用法?Java Bus.setExtension怎么用?Java Bus.setExtension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cxf.Bus
的用法示例。
在下文中一共展示了Bus.setExtension方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: replaceWrapper
import org.apache.cxf.Bus; //导入方法依赖的package包/类
private DefaultHTTPConduitFactoryWrapper replaceWrapper(Map<String, Object> args, Bus bus)
{
HTTPConduitFactory hcf = bus.getExtension(HTTPConduitFactory.class);
//replace wrapper
DefaultHTTPConduitFactoryWrapper w = new DefaultHTTPConduitFactoryWrapper(args, false,
((AbstractHTTPConduitFactoryWrapper) hcf).getDelegate());
bus.setExtension(w, HTTPConduitFactory.class);
return w;
}
示例2: createNewBus
import org.apache.cxf.Bus; //导入方法依赖的package包/类
private Bus createNewBus(final UnifiedServiceRefMetaData serviceRefMD)
{
final Bus bus;
Bus threadBus = BusFactory.getThreadDefaultBus(false);
bus = threadBus != null ? threadBus : BusFactory.newInstance().createBus();
Configurer configurer = bus.getExtension(Configurer.class);
bus.setExtension(new CXFServiceRefStubPropertyConfigurer(serviceRefMD, configurer), Configurer.class);
return bus;
}
示例3: init
import org.apache.cxf.Bus; //导入方法依赖的package包/类
@Override
public void init()
{
Bus bus = getBus();
if (null != bus)
{
bus.setExtension(this, InstrumentationManager.class);
BusLifeCycleManager blcm = bus.getExtension(BusLifeCycleManager.class);
if (null != blcm)
{
blcm.registerLifeCycleListener(this);
}
}
}
示例4: setCXFManagement
import org.apache.cxf.Bus; //导入方法依赖的package包/类
protected static void setCXFManagement(Bus bus, Map<String, String> props) {
if (props != null && !props.isEmpty()) {
final String p = props.get(Constants.CXF_MANAGEMENT_ENABLED);
if ("true".equalsIgnoreCase(p) || "1".equalsIgnoreCase(p)) {
InstrumentationManagerExtImpl instrumentationManagerImpl = new InstrumentationManagerExtImpl();
instrumentationManagerImpl.setBus(bus);
instrumentationManagerImpl.setEnabled(true);
instrumentationManagerImpl.init();
instrumentationManagerImpl.initMBeanServer();
bus.setExtension(instrumentationManagerImpl, InstrumentationManager.class);
CounterRepository couterRepository = new CounterRepository();
couterRepository.setBus(bus);
final String installRespTimeInterceptors = props.get(Constants.CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS);
if (installRespTimeInterceptors == null ||
"true".equalsIgnoreCase(installRespTimeInterceptors) ||
"1".equalsIgnoreCase(installRespTimeInterceptors)) {
ResponseTimeMessageInInterceptor in = new ResponseTimeMessageInInterceptor();
ResponseTimeMessageInvokerInterceptor invoker = new ResponseTimeMessageInvokerInterceptor();
ResponseTimeMessageOutInterceptor out = new ResponseTimeMessageOutInterceptor();
bus.getInInterceptors().add(in);
bus.getInInterceptors().add(invoker);
bus.getOutInterceptors().add(out);
}
bus.setExtension(couterRepository, CounterRepository.class);
}
}
}
示例5: install
import org.apache.cxf.Bus; //导入方法依赖的package包/类
public static void install(Bus bus)
{
HTTPConduitFactory delegate = bus.getExtension(HTTPConduitFactory.class);
bus.setExtension(new DefaultHTTPConduitFactoryWrapper(delegate), HTTPConduitFactory.class);
}