public interface Interceptor
InterceptorSequence
.
If the accepts(ResourceMethod)
method only depends on received
ResourceMethod
, you can annotate the interceptor with @Lazy
, so the
Interceptor will only be instantiated if the accepts returns true.
You should not use @Lazy if accepts is constant, or depends on any constructor parameter.InterceptorSequence
,
Lazy
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(ResourceMethod method) |
void |
intercept(InterceptorStack stack,
ResourceMethod method,
java.lang.Object resourceInstance) |
void intercept(InterceptorStack stack, ResourceMethod method, java.lang.Object resourceInstance) throws InterceptionException
InterceptionException
boolean accepts(ResourceMethod method)
Copyright © 2013 Caelum. All Rights Reserved.