Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpGet.releaseConnection()


      }
      Header h = response.getFirstHeader("Content-Type");

      return new HttpResponseContent(h != null ? h.getValue() : null, responseContent);
    } finally {
      method.releaseConnection();
    }
  }

  public static final class HttpResponseContent {
    public String contentType;
View Full Code Here


        {
            IOUtil.close( reader );

            if ( httpMethod != null )
            {
                httpMethod.releaseConnection();
            }
            if ( httpClient != null )
            {
                httpClient.getConnectionManager().shutdown();
            }
View Full Code Here

            throw new PersistenceException("Execution exception!", eacs.getFirstException());
         }
      } catch (Exception e) {
         throw log.errorLoadingRemoteEntries(e);
      } finally {
         get.releaseConnection();
      }
   }

   private void submitProcessTask(final CacheLoaderTask cacheLoaderTask, CompletionService ecs,
                                  final TaskContext taskContext, final Set<Object> batch, final boolean loadEntry,
View Full Code Here

            count++;
         return count;
      } catch (Exception e) {
         throw log.errorLoadingRemoteEntries(e);
      } finally {
         get.releaseConnection();
      }
   }

   @Override
   public boolean contains(Object o) {
View Full Code Here

        throw new Exception("Failed JIRA REST API call. HTTP error code: " + statusCode + " Response body: "
            + responseContent);
      }
      return responseContent;
    } finally {
      method.releaseConnection();
    }
  }

  @Override
  public void setIndexStructureBuilder(IJIRAIssueIndexStructureBuilder indexStructureBuilder) {
View Full Code Here

                StringReader sr = new StringReader(handleResponse);
                inputSource = new InputSource(sr);


            } finally {
                httpGet.releaseConnection();

            }

            //  InputStream inputStream = importUrl.openStream();
            //inputSource = new InputSource(inputStream);
View Full Code Here

          throw new IOException("Failed ES REST API call. HTTP error code: " + statusCode + " Response body: "
              + responseContent);
        }
        return responseContent;
      } finally {
        method.releaseConnection();
      }
    } catch (IOException e) {
      throw e;
    } catch (Exception e) {
      throw new IOException("Failed ES REST API call: " + e.getMessage(), e);
View Full Code Here

                StringReader sr = new StringReader(handleResponse);
                inputSource = new InputSource(sr);


            } finally {
                httpGet.releaseConnection();

            }

            //  InputStream inputStream = importUrl.openStream();
            //inputSource = new InputSource(inputStream);
View Full Code Here

                StringReader sr = new StringReader(handleResponse);
                unmarshal = JAXB.unmarshal(sr, Application.class);
               

            } finally {
                httpGet.releaseConnection();

            }

        } catch (Exception e) {
            log.error(e.getMessage(), e);
View Full Code Here

        HttpGet httpGet = new HttpGet(url);
        HttpResponse response = httpclient.execute(httpGet);
        HttpEntity entity = response.getEntity();
        String body = EntityUtils.toString(entity);
        EntityUtils.consume(entity);
        httpGet.releaseConnection();
        return body;
    }

    protected String[] dropLines(String quoteList, int n) {
        String[] lines = quoteList.split("\n");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.