public abstract class HttpRequestBase extends AbstractHttpMessage implements HttpUriRequest, AbortableHttpRequest, java.lang.Cloneable
headergroup, params
Constructor and Description |
---|
HttpRequestBase() |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts execution of the request.
|
java.lang.Object |
clone() |
abstract java.lang.String |
getMethod()
Returns the HTTP method this request uses, such as
GET ,
PUT , POST , or other. |
ProtocolVersion |
getProtocolVersion()
Returns the protocol version this message is compatible with.
|
RequestLine |
getRequestLine()
Returns the request line of this request.
|
java.net.URI |
getURI()
Returns the URI this request uses, such as
http://example.org/path/to/file . |
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(java.net.URI uri) |
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
public abstract java.lang.String getMethod()
HttpUriRequest
GET
,
PUT
, POST
, or other.getMethod
in interface HttpUriRequest
public ProtocolVersion getProtocolVersion()
HttpMessage
getProtocolVersion
in interface HttpMessage
public java.net.URI getURI()
HttpUriRequest
http://example.org/path/to/file
.getURI
in interface HttpUriRequest
public RequestLine getRequestLine()
HttpRequest
getRequestLine
in interface HttpRequest
public void setURI(java.net.URI uri)
public void setConnectionRequest(ClientConnectionRequest connRequest) throws java.io.IOException
AbortableHttpRequest
ClientConnectionRequest
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 AbortableHttpRequest
java.io.IOException
ClientConnectionManager
,
ThreadSafeClientConnManager
public void setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger) throws java.io.IOException
AbortableHttpRequest
ConnectionReleaseTrigger
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 AbortableHttpRequest
java.io.IOException
public void abort()
HttpUriRequest
abort
in interface AbortableHttpRequest
abort
in interface HttpUriRequest
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)
public boolean isAborted()
HttpUriRequest
isAborted
in interface HttpUriRequest
true
if the request execution has been aborted,
false
otherwise.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException