public class DefaultRedirectStrategy extends java.lang.Object implements RedirectStrategy
RedirectStrategy.| Modifier and Type | Field and Description |
|---|---|
static DefaultRedirectStrategy |
INSTANCE |
| Constructor and Description |
|---|
DefaultRedirectStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected java.net.URI |
createLocationURI(java.lang.String location) |
java.net.URI |
getLocationURI(HttpRequest request,
HttpResponse response,
HttpContext context) |
boolean |
isRedirected(HttpRequest request,
HttpResponse response,
HttpContext context)
Determines if a request should be redirected to a new location
given the response from the target server.
|
public static final DefaultRedirectStrategy INSTANCE
public boolean isRedirected(HttpRequest request,
HttpResponse response,
HttpContext context)
throws 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
otherwiseProtocolExceptionpublic java.net.URI getLocationURI(HttpRequest request,
HttpResponse response,
HttpContext context)
throws HttpException
getLocationURI in interface RedirectStrategyHttpExceptionprotected java.net.URI createLocationURI(java.lang.String location)
throws ProtocolException
ProtocolException