当前位置: 首页>>代码示例>>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;未经允许,请勿转载。