Package org.apache.commons.httpclient

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


            errorResult(e, res);
            return res;
        } finally {
            savedClient = null;
            if (httpMethod != null) {
                httpMethod.releaseConnection();
            }
        }
    }
   
    /**
 
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

            errorResult(e, res);
            return res;
        } finally {
            savedClient = null;
            if (httpMethod != null) {
                httpMethod.releaseConnection();
            }
        }
    }
   
    /**
 
View Full Code Here

            errorResult(e, res);
            return res;
        } finally {
            savedClient = null;
            if (httpMethod != null) {
                httpMethod.releaseConnection();
            }
        }
    }
   
    /**
 
View Full Code Here

        } catch (IllegalArgumentException e) {
            // thrown by HttpClient to indicate the URL is not valid, this happens for instance
            // when trying to download a dynamic version (cfr IVY-390)
        } finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
        return UNAVAILABLE;
    }
View Full Code Here

    } catch (IOException ex) {
      m.abort();
      throw new RuntimeException(ex);
    } finally {
      Utils.close(in);
      m.releaseConnection();
      notifyFinishRequest();
    }
  }

  public synchronized void options(String path) throws java.net.ConnectException, Unauthorized, UnknownHostException, SocketTimeoutException, IOException, com.ettrema.httpclient.HttpException {
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 (IllegalArgumentException e)// e.g. some kinds of invalid URL
        {
            res.sampleEnd();
            HTTPSampleResult err = errorResult(e, res);
View Full Code Here

            return err;
        } finally {
            savedClient = null;
            JOrphanUtils.closeQuietly(instream);
            if (httpMethod != null) {
                httpMethod.releaseConnection();
            }
        }
    }

    /**
 
View Full Code Here

            status = httpClient.executeMethod(httpMethod);
            rsp = IOUtils.toString(httpMethod.getResponseBodyAsStream());
        } catch (IOException e) {
            throw new IOException("Failed to " + method + " : " + urlTail + " : code=" + status + " response=" + e.getMessage(), e);
        } finally {
            httpMethod.releaseConnection();
        }

        trace(status + ": " + rsp);

        return new HttpReply(status, rsp);
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.