Package org.apache.http.client.methods
Interface AbortableHttpRequest
- All Known Implementing Classes:
HttpDelete,HttpEntityEnclosingRequestBase,HttpGet,HttpHead,HttpOptions,HttpPost,HttpPut,HttpRequestBase,HttpTrace
public interface AbortableHttpRequest
Interface representing an HTTP request that can be aborted by shutting
down the underlying HTTP connection.
- Since:
- 4.0
- Version:
- $Revision: 639600 $
- Author:
- Oleg Kalnichevski
-
Method Summary
Modifier and Type Method Description voidabort()Aborts this http request.voidsetConnectionRequest(ClientConnectionRequest connRequest)Sets theClientConnectionRequestcallback that can be used to abort a long-lived request for a connection.voidsetReleaseTrigger(ConnectionReleaseTrigger releaseTrigger)Sets theConnectionReleaseTriggercallback that can be used to abort an active connection.
-
Method Details
-
setConnectionRequest
Sets theClientConnectionRequestcallback that can be used to abort a long-lived request for a connection. If the request is already aborted, throws anIOException.- Throws:
IOException- See Also:
ClientConnectionManager,ThreadSafeClientConnManager
-
setReleaseTrigger
Sets theConnectionReleaseTriggercallback that can be used to abort an active connection. Typically, this will be theManagedClientConnectionitself. If the request is already aborted, throws anIOException.- Throws:
IOException
-
abort
void abort()Aborts this http request. Any active execution of this method should return immediately. If the request has not started, it will abort after the next execution. Aborting this request will cause all subsequent executions with this request to fail.- See Also:
HttpClient.execute(HttpUriRequest),HttpClient.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest),HttpClient.execute(HttpUriRequest, org.apache.http.protocol.HttpContext),HttpClient.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext)
-