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.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 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 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 asGET
,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 ashttp://example.org/path/to/file
.boolean
isAborted()
Tests if the request execution has been aborted.void
setCancellable(org.apache.http.concurrent.Cancellable cancellable)
SetsCancellable
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()
-
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:
getProtocolVersion
in interfaceorg.apache.http.HttpMessage
-
getMethod
public java.lang.String getMethod()
Description copied from interface:HttpUriRequest
Returns the HTTP method this request uses, such asGET
,PUT
,POST
, or other.- Specified by:
getMethod
in interfaceHttpUriRequest
-
getURI
public java.net.URI getURI()
Description copied from interface:HttpUriRequest
Returns 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:
getURI
in interfaceHttpUriRequest
-
abort
public void abort() throws java.lang.UnsupportedOperationException
Description copied from interface:HttpUriRequest
Aborts execution of the request.- Specified by:
abort
in interfaceHttpUriRequest
- Throws:
java.lang.UnsupportedOperationException
- if the abort operation is not supported / cannot be implemented.
-
isAborted
public boolean isAborted()
Description copied from interface:HttpUriRequest
Tests if the request execution has been aborted.- Specified by:
isAborted
in interfaceHttpExecutionAware
- Specified by:
isAborted
in interfaceHttpUriRequest
- Returns:
true
if the request execution has been aborted,false
otherwise.
-
setCancellable
public void setCancellable(org.apache.http.concurrent.Cancellable cancellable)
Description copied from interface:HttpExecutionAware
SetsCancellable
for the ongoing operation.- Specified by:
setCancellable
in interfaceHttpExecutionAware
-
getRequestLine
public org.apache.http.RequestLine getRequestLine()
- Specified by:
getRequestLine
in interfaceorg.apache.http.HttpRequest
-
getConfig
public RequestConfig getConfig()
Description copied from interface:Configurable
Returns actual request configuration.- Specified by:
getConfig
in interfaceConfigurable
-
setConfig
public void setConfig(RequestConfig config)
-
setURI
public void setURI(java.net.URI uri)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-