private static class InvocationInterceptorChain.ValidatingInvocation<T> extends java.lang.Object implements InvocationInterceptor.Invocation<T>
Modifier and Type | Field and Description |
---|---|
private InvocationInterceptor.Invocation<T> |
delegate |
private java.util.List<InvocationInterceptor> |
interceptors |
private java.util.concurrent.atomic.AtomicBoolean |
invokedOrSkipped |
private static Logger |
LOG |
Constructor and Description |
---|
ValidatingInvocation(InvocationInterceptor.Invocation<T> delegate,
java.util.List<InvocationInterceptor> interceptors) |
Modifier and Type | Method and Description |
---|---|
private void |
fail(java.lang.String prefix) |
private void |
markInvokedOrSkipped() |
T |
proceed()
Proceed with this invocation.
|
void |
skip()
Explicitly skip this invocation.
|
(package private) void |
verifyInvokedAtLeastOnce() |
private static final Logger LOG
private final java.util.concurrent.atomic.AtomicBoolean invokedOrSkipped
private final InvocationInterceptor.Invocation<T> delegate
private final java.util.List<InvocationInterceptor> interceptors
ValidatingInvocation(InvocationInterceptor.Invocation<T> delegate, java.util.List<InvocationInterceptor> interceptors)
public T proceed() throws java.lang.Throwable
InvocationInterceptor.Invocation
proceed
in interface InvocationInterceptor.Invocation<T>
null
.java.lang.Throwable
- in case the invocation failedpublic void skip()
InvocationInterceptor.Invocation
This allows to bypass the check that InvocationInterceptor.Invocation.proceed()
must be
called at least once. The default implementation does nothing.
skip
in interface InvocationInterceptor.Invocation<T>
private void markInvokedOrSkipped()
void verifyInvokedAtLeastOnce()
private void fail(java.lang.String prefix)