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

pack-priv Class DefaultRedirectStrategyAdaptor

extends Object
implements RedirectStrategy
Class Inheritance
All Implemented Interfaces
org.apache.http.client.RedirectStrategy
Annotations
@Contract
threading:IMMUTABLE
@Deprecated
Imports
java.net.URI, org.apache.http.HttpRequest, .HttpResponse, .ProtocolException, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.client.RedirectHandler, .RedirectStrategy, org.apache.http.client.methods.HttpGet, .HttpHead, .HttpUriRequest, org.apache.http.protocol.HttpContext

Deprecated

(4.1) do not use

Field Summary

Modifier and TypeField and Description
private final RedirectHandler
handler

Deprecated as a consequence of RedirectHandler being deprecated.

Constructor Summary

AccessConstructor and Description
public
DefaultRedirectStrategyAdaptor(final RedirectHandler handler)

Deprecated as a consequence of RedirectHandler being deprecated.

Method Summary

Modifier and TypeMethod and Description
public RedirectHandler
getHandler()

Deprecated as a consequence of RedirectHandler being deprecated.
public HttpUriRequest
getRedirect(final HttpRequest
the executed request
request
,
final HttpResponse
the response received from the target server
response
,
final HttpContext
the context for the request execution
context
)

Implements org.apache.http.client.RedirectStrategy.getRedirect.

Determines the redirect location given the response from the target server and the current request execution context and generates a new request to be sent to the location.
public boolean
isRedirected(final HttpRequest
the executed request
request
,
final HttpResponse
the response received from the target server
response
,
final HttpContext
the context for the request execution
context
)

Implements org.apache.http.client.RedirectStrategy.isRedirected.

Determines if a request should be redirected to a new location given the response from the target server.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

handlerback to summary
private final RedirectHandler handler

Deprecated

as a consequence of RedirectHandler being deprecated. See corresponding docs for further information.

Constructor Detail

DefaultRedirectStrategyAdaptorback to summary
public DefaultRedirectStrategyAdaptor(final RedirectHandler handler)

Deprecated

as a consequence of RedirectHandler being deprecated. See corresponding docs for further information.

Method Detail

getHandlerback to summary
public RedirectHandler getHandler()

Deprecated

as a consequence of RedirectHandler being deprecated. See corresponding docs for further information.

getRedirectback to summary
public HttpUriRequest getRedirect(final HttpRequest request, final HttpResponse response, final HttpContext context) throws ProtocolException

Implements org.apache.http.client.RedirectStrategy.getRedirect.

Doc from org.apache.http.client.RedirectStrategy.getRedirect.

Determines the redirect location given the response from the target server and the current request execution context and generates a new request to be sent to the location.

Parameters
request:HttpRequest

the executed request

response:HttpResponse

the response received from the target server

context:HttpContext

the context for the request execution

Returns:HttpUriRequest

redirected request

Annotations
@Override
isRedirectedback to summary
public boolean isRedirected(final HttpRequest request, final HttpResponse response, final HttpContext context) throws ProtocolException

Implements org.apache.http.client.RedirectStrategy.isRedirected.

Doc from org.apache.http.client.RedirectStrategy.isRedirected.

Determines if a request should be redirected to a new location given the response from the target server.

Parameters
request:HttpRequest

the executed request

response:HttpResponse

the response received from the target server

context:HttpContext

the context for the request execution

Returns:boolean

true if the request should be redirected, false otherwise

Annotations
@Override