Class RedirectingEurekaHttpClient
- java.lang.Object
-
- com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator
-
- com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient
-
- All Implemented Interfaces:
EurekaHttpClient
public class RedirectingEurekaHttpClient extends EurekaHttpClientDecorator
EurekaHttpClientthat follows redirect links, and executes the requests against the finally resolved endpoint. If registration and query requests must handled separately, two different instances shall be created.Thread safety
Methods in this class may be called concurrently.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator
EurekaHttpClientDecorator.RequestExecutor<R>, EurekaHttpClientDecorator.RequestType
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_FOLLOWED_REDIRECTS
-
Constructor Summary
Constructors Constructor Description RedirectingEurekaHttpClient(java.lang.String serviceUrl, TransportClientFactory factory, DnsService dnsService)The delegate client should pass through 3xx responses without further processing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransportClientFactorycreateFactory(TransportClientFactory delegateFactory)protected <R> EurekaHttpResponse<R>execute(EurekaHttpClientDecorator.RequestExecutor<R> requestExecutor)voidshutdown()-
Methods inherited from class com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator
cancel, deleteStatusOverride, getApplication, getApplications, getDelta, getInstance, getInstance, getSecureVip, getVip, register, sendHeartBeat, statusUpdate
-
-
-
-
Field Detail
-
MAX_FOLLOWED_REDIRECTS
public static final int MAX_FOLLOWED_REDIRECTS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RedirectingEurekaHttpClient
public RedirectingEurekaHttpClient(java.lang.String serviceUrl, TransportClientFactory factory, DnsService dnsService)The delegate client should pass through 3xx responses without further processing.
-
-
Method Detail
-
shutdown
public void shutdown()
-
execute
protected <R> EurekaHttpResponse<R> execute(EurekaHttpClientDecorator.RequestExecutor<R> requestExecutor)
- Specified by:
executein classEurekaHttpClientDecorator
-
createFactory
public static TransportClientFactory createFactory(TransportClientFactory delegateFactory)
-
-