本文整理汇总了Java中com.mysql.fabric.proto.xmlrpc.ResultSetParser类的典型用法代码示例。如果您正苦于以下问题:Java ResultSetParser类的具体用法?Java ResultSetParser怎么用?Java ResultSetParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResultSetParser类属于com.mysql.fabric.proto.xmlrpc包,在下文中一共展示了ResultSetParser类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import com.mysql.fabric.proto.xmlrpc.ResultSetParser; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void setUp() throws Exception {
final Map<String, ?> columns = new HashMap<String, List<String>>() {
private static final long serialVersionUID = 1L;
{
put("names", Arrays.asList(new String[] { "server_uuid", "group_id", "host", "port", "mode", "status", "weight" }));
}
};
final List<?> row1 = Arrays.asList(new Object[] { "5e26a7ab-de84-11e2-a885-df73a3d95316", "fabric_test1_global", "127.0.0.1", 3401, 3, 3, 1.0 });
final List<?> row2 = Arrays.asList(new Object[] { "07eee140-d466-11e3-abdf-dfb2de41aa92", "fabric_test1_shard1", "127.0.0.1", 3402, 1, 2, 1.0 });
final List<?> rows = Arrays.asList(new List[] { row1, row2 });
Map<String, ?> resultData = new HashMap<String, Object>() {
private static final long serialVersionUID = 1L;
{
put("info", columns);
put("rows", rows);
}
};
this.exampleServersResultSet = new ResultSetParser().parse((Map<String, ?>) resultData.get("info"), (List<List<Object>>) resultData.get("rows"));
}
开发者ID:bragex,项目名称:the-vigilantes,代码行数:24,代码来源:TestResultSetParser.java
示例2: Response
import com.mysql.fabric.proto.xmlrpc.ResultSetParser; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public Response(List<?> responseData) throws FabricCommunicationException {
// parser of protocol version 1 as defined by WL#7760
this.protocolVersion = (Integer) responseData.get(0);
if (this.protocolVersion != 1) {
throw new FabricCommunicationException("Unknown protocol version: " + this.protocolVersion);
}
this.fabricUuid = (String) responseData.get(1);
this.ttl = (Integer) responseData.get(2);
this.errorMessage = (String) responseData.get(3);
if ("".equals(this.errorMessage)) {
this.errorMessage = null;
}
List<Map<String, ?>> resultSets = (List<Map<String, ?>>) responseData.get(4);
if (resultSets.size() > 0) {
Map<String, ?> resultData = resultSets.get(0);
this.resultSet = new ResultSetParser().parse((Map<String, ?>) resultData.get("info"), (List<List<Object>>) resultData.get("rows"));
}
}
开发者ID:bragex,项目名称:the-vigilantes,代码行数:20,代码来源:Response.java
示例3: Response
import com.mysql.fabric.proto.xmlrpc.ResultSetParser; //导入依赖的package包/类
public Response(List responseData) throws FabricCommunicationException {
// parser of protocol version 1 as defined by WL#7760
this.protocolVersion = (Integer) responseData.get(0);
if (this.protocolVersion != 1) {
throw new FabricCommunicationException("Unknown protocol version: " + this.protocolVersion);
}
this.fabricUuid = (String) responseData.get(1);
this.ttl = (Integer) responseData.get(2);
this.errorMessage = (String) responseData.get(3);
if ("".equals(this.errorMessage)) {
this.errorMessage = null;
}
List resultSets = (List) responseData.get(4);
if (resultSets.size() > 0) {
Map<String, ?> resultData = (Map<String, ?>) resultSets.get(0);
this.resultSet = new ResultSetParser().parse((Map) resultData.get("info"), (List<List>) resultData.get("rows"));
}
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:Response.java
示例4: setUp
import com.mysql.fabric.proto.xmlrpc.ResultSetParser; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
final Map columns = new HashMap() {
{
put("names", Arrays.asList(new String[] { "server_uuid", "group_id", "host", "port", "mode", "status", "weight" }));
}
};
final List row1 = Arrays.asList(new Object[] { "5e26a7ab-de84-11e2-a885-df73a3d95316", "fabric_test1_global", "127.0.0.1", 3401, 3, 3, 1.0 });
final List row2 = Arrays.asList(new Object[] { "07eee140-d466-11e3-abdf-dfb2de41aa92", "fabric_test1_shard1", "127.0.0.1", 3402, 1, 2, 1.0 });
final List rows = Arrays.asList(new List[] { row1, row2 });
Map resultData = new HashMap() {
{
put("info", columns);
put("rows", rows);
}
};
this.exampleServersResultSet = new ResultSetParser().parse((Map) resultData.get("info"), (List<List>) resultData.get("rows"));
}
开发者ID:mniepert,项目名称:TPKB,代码行数:19,代码来源:TestResultSetParser.java
注:本文中的com.mysql.fabric.proto.xmlrpc.ResultSetParser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论