LOG.trace("enter HttpMethodBase.recycle()"); releaseConnection();
public void executeMethod(final HttpMethodBase method) throws NeutronRestApiException { try { client.executeMethod(method); } catch (HttpException e) { s_logger.error("HttpException caught while trying to connect to the Neutron Controller", e); method.releaseConnection(); throw new NeutronRestApiException("API call to Neutron Controller Failed", e); } catch (IOException e) { s_logger.error("IOException caught while trying to connect to the Neutron Controller", e); method.releaseConnection(); throw new NeutronRestApiException("API call to Neutron Controller Failed", e); } }
protected void executeMethod(final HttpMethodBase method) throws BigSwitchBcfApiException { try { _client.executeMethod(method); if (method.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) { method.releaseConnection(); } } catch (HttpException e) { S_LOGGER.error("HttpException caught while trying to connect to the BigSwitch Controller", e); method.releaseConnection(); throw new BigSwitchBcfApiException("API call to BigSwitch Controller Failed", e); } catch (IOException e) { S_LOGGER.error("IOException caught while trying to connect to the BigSwitch Controller", e); method.releaseConnection(); throw new BigSwitchBcfApiException("API call to BigSwitch Controller Failed", e); } }
m.releaseConnection(); S_LOGGER.error(errorMessageBase + errorMessage); throw new BigSwitchBcfApiException(errorMessageBase + errorMessage + customErrorMsg);
@Override public void close() throws IOException { method.releaseConnection(); } };
/** * Called when the response has been generated. Default action is to release * the HttpMethod's connection. Subclasses may override. * @param httpMethod the httpMethod used */ protected void onResponseGenerated(final HttpMethodBase httpMethod) { httpMethod.releaseConnection(); }
/** * Called when the response has been generated. Default action is to release * the HttpMethod's connection. Subclasses may override. * @param httpMethod the httpMethod used */ protected void onResponseGenerated(final HttpMethodBase httpMethod) { httpMethod.releaseConnection(); }
@Override public void finish() { if(null != httpClientMethod){ httpClientMethod.releaseConnection(); } }
/** * Called when the response has been generated. Default action is to release * the HttpMethod's connection. Subclasses may override. * @param httpMethod the httpMethod used */ protected void onResponseGenerated(final HttpMethodBase httpMethod) { httpMethod.releaseConnection(); }
public void run() { method.releaseConnection(); } });
@Override public void releaseConnection() { method.releaseConnection(); }
protected void close() throws XmlRpcClientException { method.releaseConnection(); }
@Override public void close() throws IOException { // Tidy the main stream super.close(); // Now release the underlying resources if (httpRequest != null) { httpRequest.releaseConnection(); httpRequest = null; } }
public void close() throws IOException { try { super.close(); } finally { method.releaseConnection(); } } };
public void close() throws IOException { try { super.close(); } finally { method.releaseConnection(); } } };
public void close() throws IOException { try { super.close(); } finally { method.releaseConnection(); } } };
@Override public void close() throws IOException { // Tidy the main stream super.close(); // Now release the underlying resources if (httpRequest != null) { httpRequest.releaseConnection(); httpRequest = null; } }
private byte[] executeMethodForBytes(HttpMethodBase request, IProgressMonitor monitor) throws ReviewboardException { monitor = Policy.monitorFor(monitor); ensureIsLoggedIn(monitor); try { monitor.beginTask("Executing request", IProgressMonitor.UNKNOWN); executeRequest(request, monitor); return getResponseBodyAsByteArray(request, monitor); } finally { request.releaseConnection(); monitor.done(); } }
public void close() { // try to release underlying resources if (closed) return; if (executed) { consumeContent(); } else method.abort(); method.releaseConnection(); closed = true; session.removeMethod(this); }
private String executeMethod(HttpMethodBase request, IProgressMonitor monitor) throws ReviewboardException { monitor = Policy.monitorFor(monitor); ensureIsLoggedIn(monitor); try { monitor.beginTask("Executing request", IProgressMonitor.UNKNOWN); int statusCode = executeRequest(request, monitor); if ( statusCode == HttpStatus.SC_NOT_FOUND ) throw new ReviewboardResourceNotFoundException(request.getPath()); return getResponseBodyAsString(request, monitor); } finally { request.releaseConnection(); monitor.done(); } }