@SuppressWarnings("unused")
 public HttpCommandResponse execute(String url, HttpParameters parameters, String charsetName)
     throws IOException {
   HttpPost httpPut = new HttpPost(url);
   httpPut.setEntity(new UrlEncodedFormEntity(parameters, Charset.forName(charsetName)));
   return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(httpPut));
 }
 @SuppressWarnings("unused")
 public HttpCommandResponse execute(String url, String body, String mimeType, String charsetName)
     throws IOException {
   HttpPost httpPut = new HttpPost(url);
   httpPut.setEntity(
       new StringEntity(body, ContentType.create(mimeType, Charset.forName(charsetName))));
   return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(httpPut));
 }
Beispiel #3
0
  @Override
  public void shutdown() {
    if (closed.compareAndSet(false, true)) {
      if (scheduler != null) {
        logger.debug("Shutting down the scheduler");
        scheduler.shutdown();
      }
      shellScope.closeAllResources();

      shellHttpClient.shutdown();

      console.println();
      console.println(MessagesProvider.getMessage(ShellSettings.BYE_MESSAGE));

      console.shutdown();
    }
  }
 @SuppressWarnings("unused")
 public HttpCommandResponse execute(String url, String body) throws IOException {
   HttpPost httpPut = new HttpPost(url);
   httpPut.setEntity(new StringEntity(body, ContentType.DEFAULT_TEXT));
   return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(httpPut));
 }
 @SuppressWarnings("unused")
 public HttpCommandResponse execute(String url) throws IOException {
   return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(new HttpPost(url)));
 }