本文整理汇总了Java中org.apache.cxf.transport.http.HTTPTransportFactory.getRegistry方法的典型用法代码示例。如果您正苦于以下问题:Java HTTPTransportFactory.getRegistry方法的具体用法?Java HTTPTransportFactory.getRegistry怎么用?Java HTTPTransportFactory.getRegistry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cxf.transport.http.HTTPTransportFactory
的用法示例。
在下文中一共展示了HTTPTransportFactory.getRegistry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initFrameworkServlet
import org.apache.cxf.transport.http.HTTPTransportFactory; //导入方法依赖的package包/类
@Override
protected void initFrameworkServlet() throws ServletException, BeansException {
this.httpInvokerHandler = new KSBHttpInvokerHandler();
Bus bus = KSBServiceLocator.getCXFBus();
List<Interceptor<? extends Message>> inInterceptors = KSBServiceLocator.getInInterceptors();
if(inInterceptors != null) {
List<Interceptor<? extends Message>> busInInterceptors = bus.getInInterceptors();
busInInterceptors.addAll(inInterceptors);
}
List<Interceptor<? extends Message>> outInterceptors = KSBServiceLocator.getOutInterceptors();
if(outInterceptors != null) {
List<Interceptor<? extends Message>> busOutInterceptors = bus.getOutInterceptors();
busOutInterceptors.addAll(outInterceptors);
}
HTTPTransportFactory transportFactory = bus.getExtension(HTTPTransportFactory.class);
if (transportFactory == null) {
throw new IllegalStateException("Failed to locate HTTPTransportFactory extension on Apache CXF Bus");
}
DestinationRegistry destinationRegistry = transportFactory.getRegistry();
this.cxfServletController = new ServletController(destinationRegistry, getCXFServletConfig(
this.getServletConfig()), new ServiceListGeneratorServlet(destinationRegistry, bus));
this.setPublishEvents(false);
}
示例2: getDestinationRegistryFromBus
import org.apache.cxf.transport.http.HTTPTransportFactory; //导入方法依赖的package包/类
private static DestinationRegistry getDestinationRegistryFromBus(Bus bus) throws ServletException {
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
try {
DestinationFactory df = dfm
.getDestinationFactory("http://cxf.apache.org/transports/http/configuration");
if (df instanceof HTTPTransportFactory) {
HTTPTransportFactory transportFactory = (HTTPTransportFactory)df;
return transportFactory.getRegistry();
}
} catch (BusException e) {
throw Messages.MESSAGES.cannotObtainDestinationFactoryForHttpTransport(e);
}
return null;
}
示例3: getDestinationRegistryFromBus
import org.apache.cxf.transport.http.HTTPTransportFactory; //导入方法依赖的package包/类
private static DestinationRegistry getDestinationRegistryFromBus(Bus bus) {
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
try {
DestinationFactory df = dfm.getDestinationFactory("http://cxf.apache.org/transports/http/configuration");
if (df instanceof HTTPTransportFactory) {
HTTPTransportFactory transportFactory = (HTTPTransportFactory) df;
return transportFactory.getRegistry();
}
} catch (BusException e) {
// why are we throwing a busexception if the DF isn't found?
}
return null;
}