Package com.orbitz.consul.util.failover
Class ConsulFailoverInterceptor
- java.lang.Object
-
- com.orbitz.consul.util.failover.ConsulFailoverInterceptor
-
- All Implemented Interfaces:
okhttp3.Interceptor
public class ConsulFailoverInterceptor extends java.lang.Object implements okhttp3.Interceptor
-
-
Constructor Summary
Constructors Constructor Description ConsulFailoverInterceptor(ConsulFailoverStrategy strategy)Allows customization of the interceptor chainConsulFailoverInterceptor(java.util.Collection<com.google.common.net.HostAndPort> targets, long timeout)Default constructor for a set of hosts and ports
-
Method Summary
Modifier and Type Method Description okhttp3.Responseintercept(okhttp3.Interceptor.Chain chain)
-
-
-
Constructor Detail
-
ConsulFailoverInterceptor
public ConsulFailoverInterceptor(java.util.Collection<com.google.common.net.HostAndPort> targets, long timeout)Default constructor for a set of hosts and ports- Parameters:
targets-
-
ConsulFailoverInterceptor
public ConsulFailoverInterceptor(ConsulFailoverStrategy strategy)
Allows customization of the interceptor chain- Parameters:
strategy-
-
-