Package org.apache.commons.httpclient

Examples of org.apache.commons.httpclient.HttpMethodBase.releaseConnection()


                            "" + returnCode, method.getResponseBodyAsString()));
                    fault.addFaultDetail(Constants.QNAME_FAULTDETAIL_HTTPERRORCODE,
                            Integer.toString(returnCode));
                    throw fault;
                } finally {
                    method.releaseConnection(); // release connection back to pool.
                }
            }

            // wrap the response body stream so that close() also releases the connection back to the pool.
            InputStream releaseConnectionOnCloseStream = createConnectionReleasingInputStream(method);
View Full Code Here


      // Follow redirects and download page resources if appropriate:
      res = resultProcessing(areFollowingRedirect, frameDepth, res);

      log.debug("End : sample");
      if (httpMethod != null)
        httpMethod.releaseConnection();
      return res;
    } catch (IllegalArgumentException e)// e.g. some kinds of invalid URL
    {
      res.sampleEnd();
      HTTPSampleResult err = errorResult(e, res);
View Full Code Here

      err.setSampleLabel("Error: " + url.toString());
      return err;
    } finally {
            JOrphanUtils.closeQuietly(instream);
      if (httpMethod != null)
        httpMethod.releaseConnection();
    }
  }

    /**
     * Set up the PUT data (if present)
View Full Code Here

      String responseHeaders = getResponseHeaders(httpMethod);
      res.setResponseHeaders(responseHeaders);

      log.debug("End : sample");
      httpMethod.releaseConnection();

      return res;
    } catch (MalformedURLException e) {
      res.sampleEnd();
      log.warn(e.getMessage());
View Full Code Here

      res.setResponseMessage(e.getMessage());
      return res;
    } finally {
      JOrphanUtils.closeQuietly(instream);
      if (httpMethod != null) {
        httpMethod.releaseConnection();
        return res;
      }
    }
  }
View Full Code Here

            // Follow redirects and download page resources if appropriate:
            res = resultProcessing(areFollowingRedirect, frameDepth, res);
      */
            log.debug("End : sample");
            httpMethod.releaseConnection();
           
            return res;
        }
        catch (MalformedURLException e) {
            res.sampleEnd();
View Full Code Here

            res.setResponseMessage(e.getMessage());
            return res;
        } finally {
            JOrphanUtils.closeQuietly(instream);
            if (httpMethod != null) {
                httpMethod.releaseConnection();
                return res;
            }
        }
    }
View Full Code Here

             // Follow redirects and download page resources if appropriate:
             res = resultProcessing(areFollowingRedirect, frameDepth, res);
             */
            log.debug("End : sample");
            httpMethod.releaseConnection();

            return res;
        } catch (MalformedURLException e) {
            res.sampleEnd();
            log.warn(e.getMessage());
View Full Code Here

            res.setResponseMessage(e.getMessage());
            return res;
        } finally {
            JOrphanUtils.closeQuietly(instream);
            if (httpMethod != null) {
                httpMethod.releaseConnection();
                return res;
            }
        }
    }
View Full Code Here

            String responseHeaders = getResponseHeaders(httpMethod);
            res.setResponseHeaders(responseHeaders);

            log.debug("End : sample");
            httpMethod.releaseConnection();

            return res;
        } catch (MalformedURLException e) {
            res.sampleEnd();
            log.warn(e.getMessage());
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.