public final class RedirectingHttpRequesterFilter extends java.lang.Object implements StreamingHttpClientFilterFactory, StreamingHttpConnectionFilterFactory, HttpExecutionStrategyInfluencer
StreamingHttpRequester.request(HttpExecutionStrategy, StreamingHttpRequest)
method receives 3XX status code in the
response
.
Notes:
Location
header.request target
and host header
are
sufficient for a provided request-to-group-key function.HttpClient
or HttpConnection
, this filter may be
limited to automatically following relative redirects only.Constructor and Description |
---|
RedirectingHttpRequesterFilter()
Create a new instance, only performing relative redirects.
|
RedirectingHttpRequesterFilter(boolean onlyRelativeClient)
Create a new instance, performing relative redirects only for
HttpConnection . |
RedirectingHttpRequesterFilter(boolean onlyRelativeClient,
boolean onlyRelativeConnection)
Create a new instance.
|
RedirectingHttpRequesterFilter(boolean onlyRelativeClient,
boolean onlyRelativeConnection,
int maxRedirects)
Create a new instance.
|
RedirectingHttpRequesterFilter(boolean onlyRelativeClient,
int maxRedirects)
Create a new instance, performing relative redirects only for
HttpConnection . |
RedirectingHttpRequesterFilter(int maxRedirects)
Create a new instance, only performing relative redirects.
|
Modifier and Type | Method and Description |
---|---|
StreamingHttpClientFilter |
create(FilterableStreamingHttpClient client)
Creates a
StreamingHttpClientFilter using the provided StreamingHttpClientFilter . |
StreamingHttpConnectionFilter |
create(FilterableStreamingHttpConnection connection)
Create a
StreamingHttpConnectionFilter using the provided FilterableStreamingHttpConnection . |
HttpExecutionStrategy |
influenceStrategy(HttpExecutionStrategy strategy)
Optionally modify the passed
HttpExecutionStrategy to a new HttpExecutionStrategy that suits
this HttpExecutionStrategyInfluencer . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, asMultiAddressClientFilter
append
defaultStreamingInfluencer
public RedirectingHttpRequesterFilter()
public RedirectingHttpRequesterFilter(int maxRedirects)
maxRedirects
- The maximum number of follow up redirects.public RedirectingHttpRequesterFilter(boolean onlyRelativeClient)
HttpConnection
.onlyRelativeClient
- Limits the redirects to relative paths for HttpClient
filters.public RedirectingHttpRequesterFilter(boolean onlyRelativeClient, int maxRedirects)
HttpConnection
.onlyRelativeClient
- Limits the redirects to relative paths for HttpClient
filters.maxRedirects
- The maximum number of follow up redirects.public RedirectingHttpRequesterFilter(boolean onlyRelativeClient, boolean onlyRelativeConnection)
onlyRelativeClient
- Limits the redirects to relative paths for HttpClient
filters.onlyRelativeConnection
- Limits the redirects to relative paths for HttpConnection
filters.public RedirectingHttpRequesterFilter(boolean onlyRelativeClient, boolean onlyRelativeConnection, int maxRedirects)
onlyRelativeClient
- Limits the redirects to relative paths for HttpClient
filters.onlyRelativeConnection
- Limits the redirects to relative paths for HttpConnection
filters.maxRedirects
- The maximum number of follow up redirects.public StreamingHttpClientFilter create(FilterableStreamingHttpClient client)
StreamingHttpClientFilterFactory
StreamingHttpClientFilter
using the provided StreamingHttpClientFilter
.create
in interface StreamingHttpClientFilterFactory
client
- FilterableStreamingHttpClient
to filterStreamingHttpClientFilter
using the provided StreamingHttpClientFilter
.public StreamingHttpConnectionFilter create(FilterableStreamingHttpConnection connection)
StreamingHttpConnectionFilterFactory
StreamingHttpConnectionFilter
using the provided FilterableStreamingHttpConnection
.create
in interface StreamingHttpConnectionFilterFactory
connection
- FilterableStreamingHttpConnection
to filterStreamingHttpConnectionFilter
using the provided FilterableStreamingHttpConnection
.public HttpExecutionStrategy influenceStrategy(HttpExecutionStrategy strategy)
HttpExecutionStrategyInfluencer
HttpExecutionStrategy
to a new HttpExecutionStrategy
that suits
this HttpExecutionStrategyInfluencer
.influenceStrategy
in interface HttpExecutionStrategyInfluencer
strategy
- HttpExecutionStrategy
to influence.HttpExecutionStrategy
that suits this HttpExecutionStrategyInfluencer