Example #1
0
 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;
 }
Example #2
0
  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;
  }
Example #3
0
 public String createURL(Map parameterValues, String encoding) {
   return delegate.createURL(parameterValues, encoding);
 }
Example #4
0
 public String createURL(Map parameterValues, String encoding, String fragment) {
   return delegate.createURL(parameterValues, encoding, fragment);
 }