本文整理汇总了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();
}
示例2: isResponseGzipCompressed
import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
@Override
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig config) {
return HttpUtil.isUsingGzipEncoding(con.getHeaderField("Content-Encoding"));
}
示例3: setXmlRpcStreamRequestConfig
import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
public void setXmlRpcStreamRequestConfig(XmlRpcStreamRequestConfig config) {
this.xmlRpcStreamRequestConfig = config;
}
示例4: getXmlRpcStreamRequestConfig
import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
public XmlRpcStreamRequestConfig getXmlRpcStreamRequestConfig() {
return xmlRpcStreamRequestConfig;
}
示例5: isResponseGzipCompressed
import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig) {
return responseGzipCompressed;
}
示例6: BugzParsingHandler
import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig; //导入依赖的package包/类
public BugzParsingHandler(XMLReader xr, XmlRpcStreamRequestConfig pConfig,
TypeFactory pTypeFactory) {
super(pConfig, pTypeFactory);
this.xr = xr;
}