1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- package uraxis.impl;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.ArrayList;
- public class MyDaemonInterface {
- public MyDaemonInterface(String host, int port) {
- // XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
- // config.setEnabledForExtensions(true);
- // try {
- // config.setServerURL(new URL("http://" + host + ":" + port + "/RPC2"));
- // } catch (MalformedURLException e) {
- // e.printStackTrace();
- // }
- // config.setConnectionTimeout(1000); //1s
- // client = new XmlRpcClient();
- // client.setConfig(config);
- }
- public boolean isReachable() {
- // try {
- // client.execute("get_title", new ArrayList<String>());
- // return true;
- // } catch (XmlRpcException e) {
- // return false;
- // }
- return true;
- }
- public void setTitle(String title) {
- }
- public String getTitle() {
- return "";
- }
- public String getMessage(String name) {
- return "";
- }
- // public String getTitle() throws XmlRpcException, UnknownResponseException {
- // Object result = client.execute("get_title", new ArrayList<String>());
- // return processString(result);
- // }
- //
- // public String setTitle(String title) throws XmlRpcException, UnknownResponseException {
- // ArrayList<String> args = new ArrayList<String>();
- // args.add(title);
- // Object result = client.execute("set_title", args);
- // return processString(result);
- // }
- //
- // public String getMessage(String name) throws XmlRpcException, UnknownResponseException {
- // ArrayList<String> args = new ArrayList<String>();
- // args.add(name);
- // Object result = client.execute("get_message", args);
- // return processString(result);
- // }
- }
|