MyDaemonInterface.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package uraxis.impl;
  2. import java.net.MalformedURLException;
  3. import java.net.URL;
  4. import java.util.ArrayList;
  5. public class MyDaemonInterface {
  6. public MyDaemonInterface(String host, int port) {
  7. // XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
  8. // config.setEnabledForExtensions(true);
  9. // try {
  10. // config.setServerURL(new URL("http://" + host + ":" + port + "/RPC2"));
  11. // } catch (MalformedURLException e) {
  12. // e.printStackTrace();
  13. // }
  14. // config.setConnectionTimeout(1000); //1s
  15. // client = new XmlRpcClient();
  16. // client.setConfig(config);
  17. }
  18. public boolean isReachable() {
  19. // try {
  20. // client.execute("get_title", new ArrayList<String>());
  21. // return true;
  22. // } catch (XmlRpcException e) {
  23. // return false;
  24. // }
  25. return true;
  26. }
  27. public void setTitle(String title) {
  28. }
  29. public String getTitle() {
  30. return "";
  31. }
  32. public String getMessage(String name) {
  33. return "";
  34. }
  35. // public String getTitle() throws XmlRpcException, UnknownResponseException {
  36. // Object result = client.execute("get_title", new ArrayList<String>());
  37. // return processString(result);
  38. // }
  39. //
  40. // public String setTitle(String title) throws XmlRpcException, UnknownResponseException {
  41. // ArrayList<String> args = new ArrayList<String>();
  42. // args.add(title);
  43. // Object result = client.execute("set_title", args);
  44. // return processString(result);
  45. // }
  46. //
  47. // public String getMessage(String name) throws XmlRpcException, UnknownResponseException {
  48. // ArrayList<String> args = new ArrayList<String>();
  49. // args.add(name);
  50. // Object result = client.execute("get_message", args);
  51. // return processString(result);
  52. // }
  53. }