* Adds an instance of this class to the given handler
* mapping.
*/
public static void addSystemHandler(final PropertyHandlerMapping pMapping)
throws XmlRpcException {
final RequestProcessorFactoryFactory factory = pMapping.getRequestProcessorFactoryFactory();
final XmlRpcSystemImpl systemHandler = new XmlRpcSystemImpl(pMapping);
pMapping.setRequestProcessorFactoryFactory(new RequestProcessorFactoryFactory(){
public RequestProcessorFactory getRequestProcessorFactory(Class pClass)
throws XmlRpcException {
if (XmlRpcSystemImpl.class.equals(pClass)) {
return new RequestProcessorFactory(){
public Object getRequestProcessor(XmlRpcRequest request)
throws XmlRpcException {
return systemHandler;
}
};
} else {
return factory.getRequestProcessorFactory(pClass);
}
}
});
pMapping.addHandler("system", XmlRpcSystemImpl.class);
}