Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpRequestBase.abort()


            }
            throw e;
        }
        catch (final RuntimeException e) {
            logger.error("A runtime exception has occured while executing request", e);
            req.abort();
            throw e;
        }
        finally {
            req.releaseConnection();
        }
View Full Code Here


            if (responseHeaders != null) {
                responseHeaders.addAll(Arrays.asList(httpResponse.getAllHeaders()));
            }
        } catch (IOException e) {
            httpMethod.abort();
            throw e;
        }

        return response;
    }
View Full Code Here

     
      rsp=e.response;
     
     
      if(!e.done){
        req.abort();
        if(throwonerror)
          throw new HTTPException("408 Request Time-out","a timeout occurred in tag http",408,"Time-out",rsp.getURL());
        setRequestTimeout(cfhttp)
        return;
        //throw new ApplicationException("timeout"); 
View Full Code Here

      if (resultCode != 200)
        throw new ResponseException("Unexpected result code "+resultCode+": "+convertToString(httpResponse));
      Object jo = convertToJSON(httpResponse);
      response.acceptJSONObject(jo);
    } finally {
      method.abort();
    }
  }

  /**
   * Obtain repository information.
View Full Code Here

      if (resultCode != 200)
        throw new IOException("Unexpected result code "+resultCode+": "+convertToString(httpResponse));
      Object jo = convertToJSON(httpResponse);
      response.acceptJSONObject(jo);
    } finally {
      method.abort();
    }
  }

  /**
   * Obtain repository information.
View Full Code Here

            else
            {
                log.error("IOException occurred during execution for {} {}", proxyTargetURL, e);
            }
           
            httpRequest.abort();
            httpEntity = null;
           
            throw e;
        }
        catch (Exception e)
View Full Code Here

            else
            {
                log.error("Exception occurred during execution for {} {}", proxyTargetURL, e);
            }
           
            httpRequest.abort();
            httpEntity = null;
           
            throw new HttpReverseProxyException(e);
        }
        finally
View Full Code Here

        HttpRequestBase entityRequest = setupHttpRequest(request, client, entityWriter);

        try {
            return client.execute(entityRequest);
        } catch (Exception ex) {
            entityRequest.abort();
            throw new RuntimeException(ex);
        }
    }

    private HttpRequestBase setupHttpRequest(ClientRequest request,
View Full Code Here

      if (resultCode != 200)
        throw new ResponseException("Unexpected result code "+resultCode+": "+convertToString(httpResponse));
      Object jo = convertToJSON(httpResponse);
      response.acceptJSONObject(jo);
    } finally {
      method.abort();
    }
  }

  /**
   * Obtain repository information.
View Full Code Here

      if (resultCode != 200)
        throw new IOException("Unexpected result code "+resultCode+": "+convertToString(httpResponse));
      Object jo = convertToJSON(httpResponse);
      response.acceptJSONObject(jo);
    } finally {
      method.abort();
    }
  }

  /**
   * Obtain repository information.
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.