/** * Reads handler definitions from a property file. * @param pClassLoader The class loader being used to load * handler classes. * @param pURL The URL from which to load the property file * @throws IOException Loading the property file failed. * @throws XmlRpcException Initializing the handlers failed. */ public void load(ClassLoader pClassLoader, URL pURL) throws IOException, XmlRpcException { Properties props = new Properties(); props.load(pURL.openStream()); load(pClassLoader, props); }
/** * Reads handler definitions from a property file. * @param pClassLoader The class loader being used to load * handler classes. * @param pURL The URL from which to load the property file * @throws IOException Loading the property file failed. * @throws XmlRpcException Initializing the handlers failed. */ public void load(ClassLoader pClassLoader, URL pURL) throws IOException, XmlRpcException { Properties props = new Properties(); props.load(pURL.openStream()); load(pClassLoader, props); }
/** * Reads handler definitions from a property file. * @param pClassLoader The class loader being used to load * handler classes. * @param pURL The URL from which to load the property file * @throws IOException Loading the property file failed. * @throws XmlRpcException Initializing the handlers failed. */ public void load(ClassLoader pClassLoader, URL pURL) throws IOException, XmlRpcException { Properties props = new Properties(); props.load(pURL.openStream()); load(pClassLoader, props); }
/** * Reads handler definitions from a resource file. * @param pClassLoader The class loader being used to load * handler classes. * @param pResource The resource being used, for example * "org/apache/xmlrpc/webserver/XmlRpcServlet.properties" * @throws IOException Loading the property file failed. * @throws XmlRpcException Initializing the handlers failed. */ public void load(ClassLoader pClassLoader, String pResource) throws IOException, XmlRpcException { URL url = pClassLoader.getResource(pResource); if (url == null) { throw new IOException("Unable to locate resource " + pResource); } load(pClassLoader, url); }
/** * Reads handler definitions from a resource file. * @param pClassLoader The class loader being used to load * handler classes. * @param pResource The resource being used, for example * "org/apache/xmlrpc/webserver/XmlRpcServlet.properties" * @throws IOException Loading the property file failed. * @throws XmlRpcException Initializing the handlers failed. */ public void load(ClassLoader pClassLoader, String pResource) throws IOException, XmlRpcException { URL url = pClassLoader.getResource(pResource); if (url == null) { throw new IOException("Unable to locate resource " + pResource); } load(pClassLoader, url); }
/** * Reads handler definitions from a resource file. * @param pClassLoader The class loader being used to load * handler classes. * @param pResource The resource being used, for example * "org/apache/xmlrpc/webserver/XmlRpcServlet.properties" * @throws IOException Loading the property file failed. * @throws XmlRpcException Initializing the handlers failed. */ public void load(ClassLoader pClassLoader, String pResource) throws IOException, XmlRpcException { URL url = pClassLoader.getResource(pResource); if (url == null) { throw new IOException("Unable to locate resource " + pResource); } load(pClassLoader, url); }
@Override protected PropertyHandlerMapping newPropertyHandlerMapping(URL url) throws IOException, XmlRpcException { PropertyHandlerMapping mapping = new PropertyHandlerMapping(); RequestProcessorFactoryFactory factory = new RequestSpecificProcessorFactoryFactory() { @Override protected Object getRequestProcessor(Class class1, XmlRpcRequest request) throws XmlRpcException { return super.getRequestProcessor(class1, request); } }; mapping.setRequestProcessorFactoryFactory(factory); mapping.load(Thread.currentThread().getContextClassLoader(), url); return mapping; } }
/** Creates a new instance of {@link PropertyHandlerMapping} by * loading the property file from the given URL. Called from * {@link #newXmlRpcHandlerMapping()}. */ protected PropertyHandlerMapping newPropertyHandlerMapping(URL url) throws IOException, XmlRpcException { PropertyHandlerMapping mapping = new PropertyHandlerMapping(); mapping.setAuthenticationHandler(authenticationHandler); if (requestProcessorFactoryFactory != null) { mapping.setRequestProcessorFactoryFactory(requestProcessorFactoryFactory); } if (typeConverterFactory != null) { mapping.setTypeConverterFactory(typeConverterFactory); } else { mapping.setTypeConverterFactory(server.getTypeConverterFactory()); } mapping.setVoidMethodEnabled(server.getConfig().isEnabledForExtensions()); mapping.load(Thread.currentThread().getContextClassLoader(), url); return mapping; }
/** Creates a new instance of {@link PropertyHandlerMapping} by * loading the property file from the given URL. Called from * {@link #newXmlRpcHandlerMapping()}. */ protected PropertyHandlerMapping newPropertyHandlerMapping(URL url) throws IOException, XmlRpcException { PropertyHandlerMapping mapping = new PropertyHandlerMapping(); mapping.setAuthenticationHandler(authenticationHandler); if (requestProcessorFactoryFactory != null) { mapping.setRequestProcessorFactoryFactory(requestProcessorFactoryFactory); } if (typeConverterFactory != null) { mapping.setTypeConverterFactory(typeConverterFactory); } else { mapping.setTypeConverterFactory(server.getTypeConverterFactory()); } mapping.setVoidMethodEnabled(server.getConfig().isEnabledForExtensions()); mapping.load(Thread.currentThread().getContextClassLoader(), url); return mapping; }