@Singleton public class HystrixInterceptor extends Object implements MethodInterceptor<Object,Object>
MethodInterceptor that adds support for decorating methods for Hystrix.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_COMMAND
The attribute used the Hystrix command to be executed within the
MethodInvocationContext. |
static String |
ATTRIBUTE_GROUP
The attribute used the Hystrix command to be executed within the
MethodInvocationContext. |
static int |
POSITION |
HOTSWAP, LAZY, PROXY_TARGETHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
HystrixInterceptor(RecoveryInterceptor recoveryInterceptor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
Object |
intercept(MethodInvocationContext<Object,Object> context)
Extended version of the
MethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinterceptpublic static final String ATTRIBUTE_COMMAND
MethodInvocationContext.public static final String ATTRIBUTE_GROUP
MethodInvocationContext.public static final int POSITION
public HystrixInterceptor(RecoveryInterceptor recoveryInterceptor)
recoveryInterceptor - recoveryInterceptorpublic int getOrder()
public Object intercept(MethodInvocationContext<Object,Object> context)
MethodInterceptorMethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext.intercept in interface MethodInterceptor<Object,Object>context - The context