|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.message.AbstractHttpMessage
org.apache.http.client.methods.HttpRequestBase
@NotThreadSafe public abstract class HttpRequestBase
Basic implementation of an HTTP request that can be modified. Methods of the
AbortableHttpRequest
interface implemented by this class are thread safe.
Field Summary |
---|
Fields inherited from class org.apache.http.message.AbstractHttpMessage |
---|
headergroup, params |
Constructor Summary | |
---|---|
HttpRequestBase()
|
Method Summary | |
---|---|
void |
abort()
Aborts this http request. |
Object |
clone()
|
abstract String |
getMethod()
Returns the HTTP method this request uses, such as GET ,
PUT , POST , or other. |
ProtocolVersion |
getProtocolVersion()
|
RequestLine |
getRequestLine()
|
URI |
getURI()
Returns the original request URI. |
boolean |
isAborted()
Tests if the request execution has been aborted. |
void |
releaseConnection()
A convenience method to simplify migration from HttpClient 3.1 API. |
void |
reset()
Resets internal state of the request making it reusable. |
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)
|
String |
toString()
|
Methods inherited from class org.apache.http.message.AbstractHttpMessage |
---|
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.http.HttpMessage |
---|
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams |
Constructor Detail |
---|
public HttpRequestBase()
Method Detail |
---|
public abstract String getMethod()
HttpUriRequest
GET
,
PUT
, POST
, or other.
getMethod
in interface HttpUriRequest
public ProtocolVersion getProtocolVersion()
getProtocolVersion
in interface HttpMessage
public 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 HttpUriRequest
public RequestLine getRequestLine()
getRequestLine
in interface HttpRequest
public void setURI(URI uri)
public void setConnectionRequest(ClientConnectionRequest connRequest) throws 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
IOException
ClientConnectionManager
public void setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger) throws 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
IOException
public void abort()
AbortableHttpRequest
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 void reset()
public void releaseConnection()
reset()
.
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |