@NotThreadSafe public abstract class HttpRequestBase extends org.apache.http.message.AbstractHttpMessage implements HttpUriRequest, AbortableHttpRequest, Cloneable
| Constructor and Description |
|---|
HttpRequestBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts execution of the request.
|
Object |
clone() |
abstract String |
getMethod()
Returns the HTTP method this request uses, such as
GET,
PUT, POST, or other. |
org.apache.http.ProtocolVersion |
getProtocolVersion() |
org.apache.http.RequestLine |
getRequestLine() |
URI |
getURI()
Returns the original request URI.
|
boolean |
isAborted()
Tests if the request execution has been aborted.
|
void |
setConnectionRequest(ClientConnectionRequest connRequest)
Sets the
ClientConnectionRequest callback that can be
used to abort a long-lived request for a connection. |
void |
setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger)
Sets the
ConnectionReleaseTrigger callback that can
be used to abort an active connection. |
void |
setURI(URI uri) |
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamspublic abstract String getMethod()
HttpUriRequestGET,
PUT, POST, or other.getMethod in interface HttpUriRequestpublic org.apache.http.ProtocolVersion getProtocolVersion()
getProtocolVersion in interface org.apache.http.HttpMessagepublic URI getURI()
Please note URI remains unchanged in the course of request execution and is not updated if the request is redirected to another location.
getURI in interface HttpUriRequestpublic org.apache.http.RequestLine getRequestLine()
getRequestLine in interface org.apache.http.HttpRequestpublic void setURI(URI uri)
public void setConnectionRequest(ClientConnectionRequest connRequest) throws IOException
AbortableHttpRequestClientConnectionRequest callback that can be
used to abort a long-lived request for a connection.
If the request is already aborted, throws an IOException.setConnectionRequest in interface AbortableHttpRequestIOExceptionClientConnectionManager,
ThreadSafeClientConnManagerpublic void setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger) throws IOException
AbortableHttpRequestConnectionReleaseTrigger callback that can
be used to abort an active connection.
Typically, this will be the ManagedClientConnection itself.
If the request is already aborted, throws an IOException.setReleaseTrigger in interface AbortableHttpRequestIOExceptionpublic void abort()
HttpUriRequestabort in interface AbortableHttpRequestabort in interface HttpUriRequestHttpClient.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)public boolean isAborted()
HttpUriRequestisAborted in interface HttpUriRequesttrue if the request execution has been aborted,
false otherwise.public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.