@Contract(threading=STATELESS) public class DefaultRedirectStrategy extends Object implements RedirectStrategy
RedirectStrategy
.Modifier and Type | Field and Description |
---|---|
static DefaultRedirectStrategy |
INSTANCE |
Constructor and Description |
---|
DefaultRedirectStrategy() |
Modifier and Type | Method and Description |
---|---|
protected URI |
createLocationURI(String location) |
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
RedirectStrategy
isRedirected
in interface RedirectStrategy
request
- the executed requestresponse
- the response received from the target servercontext
- the context for the request executiontrue
if the request should be redirected, false
otherwiseProtocolException
public URI getLocationURI(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException
getLocationURI
in interface RedirectStrategy
HttpException
protected URI createLocationURI(String location) throws ProtocolException
ProtocolException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.