Top Description Fields Constructors Methods
org.apache.http.impl.client

public Class RequestWrapper

extends AbstractHttpMessage
implements HttpUriRequest
Class Inheritance
All Implemented Interfaces
org.apache.http.client.methods.HttpUriRequest, org.apache.http.HttpRequest, org.apache.http.HttpMessage
Known Direct Subclasses
org.apache.http.impl.client.EntityEnclosingRequestWrapper
Annotations
@Deprecated
Imports
java.net.URI, .URISyntaxException, org.apache.http.HttpRequest, .ProtocolException, .ProtocolVersion, .RequestLine, org.apache.http.client.methods.HttpUriRequest, org.apache.http.message.AbstractHttpMessage, .BasicRequestLine, org.apache.http.params.HttpProtocolParams, org.apache.http.util.Args

Deprecated

(4.3) do not use.

A wrapper class for HttpRequests that can be used to change properties of the current request without modifying the original object.

This class is also capable of resetting the request headers to the state of the original request.

Since
4.0

Field Summary

Modifier and TypeField and Description
private int
private String
private final HttpRequest
private URI
private ProtocolVersion
Inherited from org.apache.http.message.AbstractHttpMessage:
headergroupparams

Constructor Summary

AccessConstructor and Description
public
RequestWrapper(final HttpRequest request)

Method Summary

Modifier and TypeMethod and Description
public void
abort()

Implements org.apache.http.client.methods.HttpUriRequest.abort.

Aborts execution of the request.
public int
public String
getMethod()

Implements org.apache.http.client.methods.HttpUriRequest.getMethod.

Returns the HTTP method this request uses, such as GET, PUT, POST, or other.
public HttpRequest
public ProtocolVersion
getProtocolVersion()

Implements org.apache.http.HttpMessage.getProtocolVersion.

Returns the protocol version this message is compatible with.
public RequestLine
getRequestLine()

Implements org.apache.http.HttpRequest.getRequestLine.

Returns the request line of this request.
public URI
getURI()

Implements org.apache.http.client.methods.HttpUriRequest.getURI.

Returns the URI this request uses, such as http://example.org/path/to/file.
public void
public boolean
isAborted()

Implements org.apache.http.client.methods.HttpUriRequest.isAborted.

Tests if the request execution has been aborted.
public boolean
public void
public void
setMethod(final String method)

public void
public void
setURI(final URI uri)

Inherited from org.apache.http.message.AbstractHttpMessage:
addHeaderaddHeadercontainsHeadergetAllHeadersgetFirstHeadergetHeadersgetLastHeadergetParamsheaderIteratorheaderIteratorremoveHeaderremoveHeaderssetHeadersetHeadersetHeaderssetParams

Field Detail

execCountback to summary
private int execCount
methodback to summary
private String method
originalback to summary
private final HttpRequest original
uriback to summary
private URI uri
versionback to summary
private ProtocolVersion version

Constructor Detail

RequestWrapperback to summary
public RequestWrapper(final HttpRequest request) throws ProtocolException

Method Detail

abortback to summary
public void abort() throws UnsupportedOperationException

Implements org.apache.http.client.methods.HttpUriRequest.abort.

Doc from org.apache.http.client.methods.HttpUriRequest.abort.

Aborts execution of the request.

Annotations
@Override
Exceptions
UnsupportedOperationException:
if the abort operation is not supported / cannot be implemented.
getExecCountback to summary
public int getExecCount()
getMethodback to summary
public String getMethod()

Implements org.apache.http.client.methods.HttpUriRequest.getMethod.

Doc from org.apache.http.client.methods.HttpUriRequest.getMethod.

Returns the HTTP method this request uses, such as GET, PUT, POST, or other.

Annotations
@Override
getOriginalback to summary
public HttpRequest getOriginal()
getProtocolVersionback to summary
public ProtocolVersion getProtocolVersion()

Implements org.apache.http.HttpMessage.getProtocolVersion.

Doc from org.apache.http.HttpMessage.getProtocolVersion.

Returns the protocol version this message is compatible with.

Annotations
@Override
getRequestLineback to summary
public RequestLine getRequestLine()

Implements org.apache.http.HttpRequest.getRequestLine.

Doc from org.apache.http.HttpRequest.getRequestLine.

Returns the request line of this request.

Returns:RequestLine

the request line.

Annotations
@Override
getURIback to summary
public URI getURI()

Implements org.apache.http.client.methods.HttpUriRequest.getURI.

Doc from org.apache.http.client.methods.HttpUriRequest.getURI.

Returns the URI this request uses, such as http://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

Annotations
@Override
incrementExecCountback to summary
public void incrementExecCount()
isAbortedback to summary
public boolean isAborted()

Implements org.apache.http.client.methods.HttpUriRequest.isAborted.

Doc from org.apache.http.client.methods.HttpUriRequest.isAborted.

Tests if the request execution has been aborted.

Returns:boolean

true if the request execution has been aborted, false otherwise.

Annotations
@Override
isRepeatableback to summary
public boolean isRepeatable()
resetHeadersback to summary
public void resetHeaders()
setMethodback to summary
public void setMethod(final String method)
setProtocolVersionback to summary
public void setProtocolVersion(final ProtocolVersion version)
setURIback to summary
public void setURI(final URI uri)