class InternalHttpRequest extends org.apache.http.message.AbstractHttpMessage implements HttpUriRequest, HttpExecutionAware, Configurable
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicBoolean |
aborted |
private java.util.concurrent.atomic.AtomicReference<org.apache.http.concurrent.Cancellable> |
cancellableRef |
private RequestConfig |
config |
private java.lang.String |
method |
private java.net.URI |
uri |
private org.apache.http.ProtocolVersion |
version |
| Constructor and Description |
|---|
InternalHttpRequest(java.lang.String method,
java.net.URI requestURI) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts execution of the request.
|
RequestConfig |
getConfig()
Returns actual request configuration.
|
java.lang.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() |
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 |
setCancellable(org.apache.http.concurrent.Cancellable cancellable)
Sets
Cancellable for the ongoing operation. |
void |
setConfig(RequestConfig config) |
void |
setProtocolVersion(org.apache.http.ProtocolVersion version) |
void |
setURI(java.net.URI uri) |
java.lang.String |
toString() |
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamsprivate final java.lang.String method
private org.apache.http.ProtocolVersion version
private java.net.URI uri
private RequestConfig config
private final java.util.concurrent.atomic.AtomicBoolean aborted
private final java.util.concurrent.atomic.AtomicReference<org.apache.http.concurrent.Cancellable> cancellableRef
InternalHttpRequest(java.lang.String method,
java.net.URI requestURI)
public void setProtocolVersion(org.apache.http.ProtocolVersion version)
public org.apache.http.ProtocolVersion getProtocolVersion()
getProtocolVersion in interface org.apache.http.HttpMessagepublic java.lang.String getMethod()
HttpUriRequestGET,
PUT, POST, or other.getMethod in interface HttpUriRequestpublic java.net.URI getURI()
HttpUriRequesthttp://example.org/path/to/file.
Note that the URI may be absolute URI (as above) or may be a relative URI.
Implementations are encouraged to return the URI that was initially requested.
To find the final URI after any redirects have been processed, please see the section entitled HTTP execution context in the HttpClient Tutorial
getURI in interface HttpUriRequestpublic void abort()
throws java.lang.UnsupportedOperationException
HttpUriRequestabort in interface HttpUriRequestjava.lang.UnsupportedOperationException - if the abort operation
is not supported / cannot be implemented.public boolean isAborted()
HttpUriRequestisAborted in interface HttpExecutionAwareisAborted in interface HttpUriRequesttrue if the request execution has been aborted,
false otherwise.public void setCancellable(org.apache.http.concurrent.Cancellable cancellable)
HttpExecutionAwareCancellable for the ongoing operation.setCancellable in interface HttpExecutionAwarepublic org.apache.http.RequestLine getRequestLine()
getRequestLine in interface org.apache.http.HttpRequestpublic RequestConfig getConfig()
ConfigurablegetConfig in interface Configurablepublic void setConfig(RequestConfig config)
public void setURI(java.net.URI uri)
public java.lang.String toString()
toString in class java.lang.Object