Package org.apache.http.client.fluent
Class InternalHttpRequest
- java.lang.Object
-
- org.apache.http.message.AbstractHttpMessage
-
- org.apache.http.client.fluent.InternalHttpRequest
-
- All Implemented Interfaces:
Configurable,HttpExecutionAware,HttpUriRequest,org.apache.http.HttpMessage,org.apache.http.HttpRequest
- Direct Known Subclasses:
InternalEntityEnclosingHttpRequest
class InternalHttpRequest extends org.apache.http.message.AbstractHttpMessage implements HttpUriRequest, HttpExecutionAware, Configurable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBooleanabortedprivate java.util.concurrent.atomic.AtomicReference<org.apache.http.concurrent.Cancellable>cancellableRefprivate RequestConfigconfigprivate java.lang.Stringmethodprivate java.net.URIuriprivate org.apache.http.ProtocolVersionversion
-
Constructor Summary
Constructors Constructor Description InternalHttpRequest(java.lang.String method, java.net.URI requestURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts execution of the request.RequestConfiggetConfig()Returns actual request configuration.java.lang.StringgetMethod()Returns the HTTP method this request uses, such asGET,PUT,POST, or other.org.apache.http.ProtocolVersiongetProtocolVersion()org.apache.http.RequestLinegetRequestLine()java.net.URIgetURI()Returns the URI this request uses, such ashttp://example.org/path/to/file.booleanisAborted()Tests if the request execution has been aborted.voidsetCancellable(org.apache.http.concurrent.Cancellable cancellable)SetsCancellablefor the ongoing operation.voidsetConfig(RequestConfig config)voidsetProtocolVersion(org.apache.http.ProtocolVersion version)voidsetURI(java.net.URI uri)java.lang.StringtoString()-
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
-
-
-
-
Field Detail
-
method
private final java.lang.String method
-
version
private org.apache.http.ProtocolVersion version
-
uri
private java.net.URI uri
-
config
private RequestConfig config
-
aborted
private final java.util.concurrent.atomic.AtomicBoolean aborted
-
cancellableRef
private final java.util.concurrent.atomic.AtomicReference<org.apache.http.concurrent.Cancellable> cancellableRef
-
-
Method Detail
-
setProtocolVersion
public void setProtocolVersion(org.apache.http.ProtocolVersion version)
-
getProtocolVersion
public org.apache.http.ProtocolVersion getProtocolVersion()
- Specified by:
getProtocolVersionin interfaceorg.apache.http.HttpMessage
-
getMethod
public java.lang.String getMethod()
Description copied from interface:HttpUriRequestReturns the HTTP method this request uses, such asGET,PUT,POST, or other.- Specified by:
getMethodin interfaceHttpUriRequest
-
getURI
public java.net.URI getURI()
Description copied from interface:HttpUriRequestReturns the URI this request uses, such ashttp://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
- Specified by:
getURIin interfaceHttpUriRequest
-
abort
public void abort() throws java.lang.UnsupportedOperationExceptionDescription copied from interface:HttpUriRequestAborts execution of the request.- Specified by:
abortin interfaceHttpUriRequest- Throws:
java.lang.UnsupportedOperationException- if the abort operation is not supported / cannot be implemented.
-
isAborted
public boolean isAborted()
Description copied from interface:HttpUriRequestTests if the request execution has been aborted.- Specified by:
isAbortedin interfaceHttpExecutionAware- Specified by:
isAbortedin interfaceHttpUriRequest- Returns:
trueif the request execution has been aborted,falseotherwise.
-
setCancellable
public void setCancellable(org.apache.http.concurrent.Cancellable cancellable)
Description copied from interface:HttpExecutionAwareSetsCancellablefor the ongoing operation.- Specified by:
setCancellablein interfaceHttpExecutionAware
-
getRequestLine
public org.apache.http.RequestLine getRequestLine()
- Specified by:
getRequestLinein interfaceorg.apache.http.HttpRequest
-
getConfig
public RequestConfig getConfig()
Description copied from interface:ConfigurableReturns actual request configuration.- Specified by:
getConfigin interfaceConfigurable
-
setConfig
public void setConfig(RequestConfig config)
-
setURI
public void setURI(java.net.URI uri)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-