本文整理汇总了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"));
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}