@Immutable public class DefaultRedirectStrategy extends Object implements RedirectStrategy
RedirectStrategy.| Modifier and Type | Field and Description |
|---|---|
static String |
REDIRECT_LOCATIONS |
| Constructor and Description |
|---|
DefaultRedirectStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected URI |
createLocationURI(String location) |
URI |
getLocationURI(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context) |
HttpUriRequest |
getRedirect(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
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.
|
boolean |
isRedirected(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
Determines if a request should be redirected to a new location
given the response from the target server.
|
public static final String REDIRECT_LOCATIONS
public boolean isRedirected(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
throws org.apache.http.ProtocolException
RedirectStrategyisRedirected in interface RedirectStrategyrequest - the executed requestresponse - the response received from the target servercontext - the context for the request executiontrue if the request should be redirected, false
otherwiseorg.apache.http.ProtocolExceptionpublic URI getLocationURI(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.ProtocolException
org.apache.http.ProtocolExceptionprotected URI createLocationURI(String location) throws org.apache.http.ProtocolException
org.apache.http.ProtocolExceptionpublic HttpUriRequest getRedirect(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.ProtocolException
RedirectStrategygetRedirect in interface RedirectStrategyrequest - the executed requestresponse - the response received from the target servercontext - the context for the request executionorg.apache.http.ProtocolExceptionCopyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.