示例#1
0
 /** Adds the bundled handlers to the server. Called by {@link #main(String[])}. */
 protected void addDefaultHandlers() throws Exception {
   // webserver.setParanoid (true);
   // webserver.acceptClient ("192.168.*.*");
   addHandler("string", "Welcome to XML-RPC!");
   addHandler("math", Math.class);
   addHandler("auth", new AuthDemo());
   addHandler("$default", new Echo());
   // XmlRpcClients can be used as Proxies in XmlRpcServers which is a
   // cool feature for applets.
   String url = "http://www.mailtothefuture.com:80/RPC2";
   addHandler("mttf", new XmlRpcClient(url));
   SystemHandler system = new SystemHandler();
   system.addDefaultSystemHandlers();
   addHandler("system", system);
 }