public class SwitchInterceptor extends Object implements Interceptor, Serializable
SwitchInterceptor
maintains a list of
InvocationMatcher
/Interceptor
pairs. Each invocation
will be checked against the registered InvocationMatchers. If one matches the current invocation, then the
corresponding Interceptor will be called. If no InvocationMatchers match, the
Invocation.proceed()
method is called with no interception.Modifier and Type | Class and Description |
---|---|
class |
SwitchInterceptor.CaseBuilder |
Constructor and Description |
---|
SwitchInterceptor() |
Modifier and Type | Method and Description |
---|---|
Object |
intercept(Invocation invocation)
Intercept the specified
Invocation . |
SwitchInterceptor.CaseBuilder |
when(InvocationMatcher matcher) |
public SwitchInterceptor()
public Object intercept(Invocation invocation) throws Throwable
Interceptor
Invocation
.intercept
in interface Interceptor
Throwable
public SwitchInterceptor.CaseBuilder when(InvocationMatcher matcher)
Copyright © 2005–2014 The Apache Software Foundation. All rights reserved.