public String createURL( String controller, String action, String pluginName, Map parameterValues, String encoding) { UrlCreatorKey key = new UrlCreatorKey(controller, action, pluginName, parameterValues, encoding, null, 1); String url = cache.get(key); if (url == null) { url = delegate.createURL(controller, action, pluginName, parameterValues, encoding); cache.put(key, url); } return url; }
public static HttpURLConnection createConnection(String method, UrlCreator urlCreator) { HttpURLConnection connection = null; try { URL url = urlCreator.createURL(); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(method); connection.setDoInput(true); connection.setChunkedStreamingMode(0); } catch (IOException e) { e.printStackTrace(); if (connection != null) { connection.disconnect(); } } return connection; }
public String createURL(Map parameterValues, String encoding) { return delegate.createURL(parameterValues, encoding); }
public String createURL(Map parameterValues, String encoding, String fragment) { return delegate.createURL(parameterValues, encoding, fragment); }