本文整理汇总了Java中org.apache.cxf.transport.DestinationFactoryManager类的典型用法代码示例。如果您正苦于以下问题:Java DestinationFactoryManager类的具体用法?Java DestinationFactoryManager怎么用?Java DestinationFactoryManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DestinationFactoryManager类属于org.apache.cxf.transport包,在下文中一共展示了DestinationFactoryManager类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
super.setUp();
BusFactory bf = BusFactory.newInstance();
//setup the camel transport for the bus
bus = bf.createBus();
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
CamelTransportFactory camelTransportFactory = new CamelTransportFactory();
//set the context here to the transport factory;
camelTransportFactory.setCamelContext(context);
ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
dfm.registerDestinationFactory(CamelTransportFactory.TRANSPORT_ID, camelTransportFactory);
cim.registerConduitInitiator(CamelTransportFactory.TRANSPORT_ID, camelTransportFactory);
BusFactory.setDefaultBus(bus);
endpointInfo = new EndpointInfo();
}
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:CamelTransportTestSupport.java
示例2: registerTransportFactory
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的package包/类
private void registerTransportFactory(CxfBeanComponent cxfBeanComponent) {
CxfBeanTransportFactory transportFactory = new CxfBeanTransportFactory();
transportFactory.setCxfBeanComponent(cxfBeanComponent);
transportFactory.setBus(bus);
// register the conduit initiator
ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
cim.registerConduitInitiator(CxfBeanTransportFactory.TRANSPORT_ID, transportFactory);
// register the destination factory
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
dfm.registerDestinationFactory(CxfBeanTransportFactory.TRANSPORT_ID, transportFactory);
}
开发者ID:HydAu,项目名称:Camel,代码行数:14,代码来源:CxfBeanEndpoint.java
示例3: getDestinationRegistryFromBus
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的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;
}
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:15,代码来源:RequestHandlerImpl.java
示例4: handleRequest
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的package包/类
@Nullable
@Override
public ModelAndView handleRequest(HttpServletRequest servletReq, HttpServletResponse servletResp) throws Exception {
String destPath = StringUtils.prependIfMissing(
StringUtils.removeStart(((String) servletReq.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE)), this.baseUrlPath),
SdcctStringUtils.SLASH), txId;
DestinationRegistry destReg =
((HTTPTransportFactory) this.bus.getExtension(DestinationFactoryManager.class).getDestinationFactoryForUri(HTTP_TRANSPORT_NS_URI)).getRegistry();
AbstractHTTPDestination dest = destReg.getDestinationForPath(destPath, true);
if (dest == null) {
dest = destReg.checkRestfulRequest(destPath);
}
if (dest != null) {
servletReq.setAttribute(ENDPOINT_ADDR_SERVLET_REQ_ATTR_NAME, (this.baseUrlPath + dest.getEndpointInfo().getAddress()));
try {
MDC.put(SdcctPropertyNames.WS_SERVER_TX_ID, (txId = this.txIdGen.generateId().toString()));
servletReq.setAttribute(SdcctPropertyNames.HTTP_SERVER_TX_ID, txId);
BusFactory.setThreadDefaultBus(bus);
dest.invoke(this.servletConfig, this.servletContext, servletReq, servletResp);
} finally {
BusFactory.setThreadDefaultBus(null);
MDC.remove(SdcctPropertyNames.WS_SERVER_TX_ID);
}
} else {
// TODO: improve error handling
LOGGER.error(String.format("Unable to determine CXF destination (path=%s) for request.", destPath));
servletResp.setStatus(HttpStatus.NOT_FOUND.value());
}
return null;
}
开发者ID:esacinc,项目名称:sdcct,代码行数:40,代码来源:WebServiceController.java
示例5: afterPropertiesSet
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
this.bus.getExtension(ResourceManager.class).addResourceResolver(new ServletContextResourceResolver(this.servletConfig.getServletContext()));
this.servletController =
new ServiceServletController(((HTTPTransportFactory) this.bus.getExtension(DestinationFactoryManager.class).getDestinationFactoryForUri(
HTTPTransportFactory.DEFAULT_NAMESPACES.get(0))).getRegistry());
}
开发者ID:esacinc,项目名称:crigtt,代码行数:9,代码来源:ServiceController.java
示例6: getDestinationRegistryFromBus
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的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;
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:14,代码来源:GenericWebServiceServlet.java
示例7: createEndpointInfo
import org.apache.cxf.transport.DestinationFactoryManager; //导入依赖的package包/类
protected EndpointInfo createEndpointInfo() throws BusException {
String transportId = getTransportId();
if (transportId == null && getAddress() != null) {
DestinationFactory df = getDestinationFactory();
if (df == null) {
DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
df = dfm.getDestinationFactoryForUri(getAddress());
}
if (df != null) {
transportId = df.getTransportIds().get(0);
}
}
// default to http transport
if (transportId == null) {
transportId = "http://schemas.xmlsoap.org/wsdl/soap/http";
}
setTransportId(transportId);
EndpointInfo ei = new EndpointInfo();
ei.setTransportId(transportId);
ei.setName(serviceFactory.getService().getName());
ei.setAddress(getAddress());
ei.setProperty(PROTOBUF_MESSAGE_CLASS, messageClass);
BindingInfo bindingInfo = createBindingInfo();
ei.setBinding(bindingInfo);
return ei;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:33,代码来源:ProtobufServerFactoryBean.java
注:本文中的org.apache.cxf.transport.DestinationFactoryManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论