本文整理匯總了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);
}