本文整理汇总了Java中com.mysql.fabric.proto.xmlrpc.XmlRpcClient类的典型用法代码示例。如果您正苦于以下问题:Java XmlRpcClient类的具体用法?Java XmlRpcClient怎么用?Java XmlRpcClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XmlRpcClient类属于com.mysql.fabric.proto.xmlrpc包,在下文中一共展示了XmlRpcClient类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.mysql.fabric.proto.xmlrpc.XmlRpcClient; //导入依赖的package包/类
public static void main(String args[]) throws Exception {
String hostname = System.getProperty("com.mysql.fabric.testsuite.hostname");
String port = System.getProperty("com.mysql.fabric.testsuite.port");
XmlRpcClient fabricClient = new XmlRpcClient("http://" + hostname + ":" + port, null, null);
System.out.println("Fabrics: " + fabricClient.getFabricNames());
System.out.println("Groups: " + fabricClient.getGroupNames());
for (String groupName : fabricClient.getGroupNames()) {
System.out.println("Group def for '" + groupName + "': " + fabricClient.getServerGroup(groupName).toString().replaceAll("Serv", "\n\tServ"));
}
System.out.println("Servers for employees.employees.50: " + fabricClient.getServersForKey("employees.employees", 50));
System.out.println("Servers for employees.employees.10050: " + fabricClient.getServersForKey("employees.employees", 10050));
System.out.flush();
System.out.println("All servers: " + fabricClient.getServerGroups());
//fabricClient.getGroup("NON_EXISTANT_GROUP");
}
示例2: main
import com.mysql.fabric.proto.xmlrpc.XmlRpcClient; //导入依赖的package包/类
public static void main(String args[]) throws Exception {
String hostname = System.getProperty("com.mysql.fabric.testsuite.hostname");
String port = System.getProperty("com.mysql.fabric.testsuite.port");
XmlRpcClient fabricClient = new XmlRpcClient("http://" + hostname + ":" + port, null, null);
System.out.println("Fabrics: " + fabricClient.getFabricNames());
System.out.println("Groups: " + fabricClient.getGroupNames());
for (String groupName : fabricClient.getGroupNames()) {
System.out.println("Group def for '" + groupName + "': " +
fabricClient.getServerGroup(groupName).toString().replaceAll("Serv", "\n\tServ"));
}
System.out.println("Servers for employees.employees.50: " + fabricClient.getServersForKey("employees.employees", 50));
System.out.println("Servers for employees.employees.10050: " + fabricClient.getServersForKey("employees.employees", 10050));
System.out.flush();
System.out.println("All servers: " + fabricClient.getServerGroups());
//fabricClient.getGroup("NON_EXISTANT_GROUP");
}
示例3: setUp
import com.mysql.fabric.proto.xmlrpc.XmlRpcClient; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
if (this.isSetForFabricTest) {
this.client = new XmlRpcClient(this.fabricUrl, this.fabricUsername, this.fabricPassword);
}
}
示例4: FabricConnection
import com.mysql.fabric.proto.xmlrpc.XmlRpcClient; //导入依赖的package包/类
public FabricConnection(String url, String username, String password) throws FabricCommunicationException {
this.client = new XmlRpcClient(url, username, password);
refreshState();
}
示例5: getClient
import com.mysql.fabric.proto.xmlrpc.XmlRpcClient; //导入依赖的package包/类
public XmlRpcClient getClient() {
return this.client;
}