diff --git a/ivy.xml b/ivy.xml index 134a9ce..7957b07 100644 --- a/ivy.xml +++ b/ivy.xml @@ -76,7 +76,7 @@ - catalogNameUrls; - private final String urlString; - - /** - * Creates and initializes a MondrianInprocProxy. - * - * @param catalogNameUrls Collection of catalog names and the URL where - * their catalog is to be found. For testing purposes, this should contain - * a catalog called "FoodMart". - * - * @param urlString JDBC connect string; must begin with "jdbc:mondrian:" - */ - public MondrianInprocProxy( - Map catalogNameUrls, - String urlString) - { - this.catalogNameUrls = catalogNameUrls; - if (!urlString.startsWith("jdbc:mondrian:")) { - throw new IllegalArgumentException(); - } - this.urlString = urlString.substring("jdbc:mondrian:".length()); - } - - // Use single-threaded executor for ease of debugging. - private static final ExecutorService singleThreadExecutor = - Executors.newSingleThreadExecutor(); - - public byte[] get(URL url, String request) throws IOException { - try { - return XmlaSupport.processSoapXmla( - request, urlString, catalogNameUrls, null); - } catch (ServletException e) { - throw new RuntimeException( - "Error while reading '" + url + "'", e); - } catch (SAXException e) { - throw new RuntimeException( - "Error while reading '" + url + "'", e); - } - } - - public Future submit( - final URL url, - final String request) - { - return singleThreadExecutor.submit( - new Callable() { - public byte[] call() throws Exception { - return get(url, request); - } - } - ); - } - - public String getEncodingCharsetName() { - return "UTF-8"; - } -} - -// End MondrianInprocProxy.java