当前位置: 首页>>代码示例>>Java>>正文


Java XmlRpcStreamRequestConfig类代码示例

本文整理汇总了Java中org.apache.xmlrpc.common.XmlRpcStreamRequestConfig的典型用法代码示例。如果您正苦于以下问题:Java XmlRpcStreamRequestConfig类的具体用法?Java XmlRpcStreamRequestConfig怎么用?Java XmlRpcStreamRequestConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


XmlRpcStreamRequestConfig类属于org.apache.xmlrpc.common包,在下文中一共展示了XmlRpcStreamRequestConfig类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: callTimeoutInSec

import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
@Override
public Object callTimeoutInSec(String method, List<?> params, int timeout,
        boolean debug) throws XmlRpcException {
    XmlRpcStreamConfig config = new XmlRpcHttpRequestConfigImpl();
    XmlRpcClient client = new XmlRpcClient();
    client.setTypeFactory(new RpcTypeFactory(client));
    XmlRpcResponseParser parser = new XmlRpcResponseParser(
            (XmlRpcStreamRequestConfig) config, client.getTypeFactory());
    XMLReader xr = SAXParsers.newXMLReader();
    xr.setContentHandler(parser);
    try {
        String result = null;
        if (getMethodResponse(method) != null) {
            result = getMethodResponse(method);
            LOGGER.debug("methodresponse call: " + method + " - " + params);
            LOGGER.trace("methodresponse reply: " + result);
        }
        if (result == null && multiRes.size() >= 0) {
            result = getResult();
            LOGGER.debug("getresult call: " + method + " - " + params);
            LOGGER.trace("getresult reply: " + result);
        }
        xr.parse(new InputSource(new StringReader(result)));
    } catch (Exception e) {
        throw new XmlRpcException("Exception: " + e.getMessage(), e);
    }
    if (parser.getErrorCode() != 0) {
        throw new XmlRpcException("Fault received[" + parser.getErrorCode()
                + "]: " + parser.getErrorMessage());
    }
    return parser.getResult();
}
 
开发者ID:apache,项目名称:cloudstack,代码行数:33,代码来源:ConnectionTest.java

示例2: isResponseGzipCompressed

import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
@Override
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig config) {
    return HttpUtil.isUsingGzipEncoding(con.getHeaderField("Content-Encoding"));
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:5,代码来源:AliasSupportedTransportFactory.java

示例3: setXmlRpcStreamRequestConfig

import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
public void setXmlRpcStreamRequestConfig(XmlRpcStreamRequestConfig config) {
    this.xmlRpcStreamRequestConfig = config;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:XmlRpcDataFormat.java

示例4: getXmlRpcStreamRequestConfig

import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
public XmlRpcStreamRequestConfig getXmlRpcStreamRequestConfig() {
    return xmlRpcStreamRequestConfig;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:XmlRpcDataFormat.java

示例5: isResponseGzipCompressed

import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig) {
	return responseGzipCompressed;
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:4,代码来源:OrchidXmlRpcTransport.java

示例6: BugzParsingHandler

import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
public BugzParsingHandler(XMLReader xr, XmlRpcStreamRequestConfig pConfig,
        TypeFactory pTypeFactory) {
    super(pConfig, pTypeFactory);
    this.xr = xr;
}
 
开发者ID:vmware,项目名称:workflowTools,代码行数:6,代码来源:BugzParsingHandler.java


注:本文中的org.apache.xmlrpc.common.XmlRpcStreamRequestConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。