當前位置: 首頁>>代碼示例>>Java>>正文


Java Bus.setExtension方法代碼示例

本文整理匯總了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;
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:10,代碼來源:HTTPConduitTestCase.java

示例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;
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:12,代碼來源:CXFServiceObjectFactoryJAXWS.java

示例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);
      }
   }
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:15,代碼來源:InstrumentationManagerExtImpl.java

示例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);
      }
   }
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:28,代碼來源:BusHolder.java

示例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);
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:6,代碼來源:DefaultHTTPConduitFactoryWrapper.java


注:本文中的org.apache.cxf.Bus.setExtension方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。