This will register the handlers supplied in the XML-RPC
server (typically from {@link #getHandlers()}
.
Enumeration handlerNames = handlers.keys();
// Loop through the requested handlers
while (handlerNames.hasMoreElements()) {
String handlerName = (String)handlerNames.nextElement();
String handlerClass = (String)handlers.get(handlerName);
// Add this handler to the server
try {
server.addHandler(handlerName,
Class.forName(handlerClass).newInstance());
System.out.println("Registered handler " + handlerName +
" to class " + handlerClass);
} catch (Exception e) {
System.out.println("Could not register handler " +
handlerName + " with class " +
handlerClass);
}
}