@Contract(threading=STATELESS) public class DefaultRedirectStrategy extends Object implements RedirectStrategy
RedirectStrategy.| 限定符和类型 | 字段和说明 |
|---|---|
static DefaultRedirectStrategy |
INSTANCE |
| 构造器和说明 |
|---|
DefaultRedirectStrategy() |
| 限定符和类型 | 方法和说明 |
|---|---|
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
RedirectStrategyisRedirected 在接口中 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 URI getLocationURI(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException
getLocationURI 在接口中 RedirectStrategyHttpExceptionprotected URI createLocationURI(String location) throws ProtocolException
ProtocolExceptionCopyright © 2023. All rights reserved.