@Test public void invokedWhenMatcherMatches() { when(matcher.matches(Matchers.<ExecutionContext>any(), Matchers.<OperationKey>any(), Matchers.<Object[]>any())).thenReturn(true); matchingInterceptor.invoke(null, key, null); verify(processor).invoke(null, key, null); }
@Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args) { if (matcher == null || matcher.matches(ctx, key, args)) { return preProcessor.invoke(ctx, key, args); } return new InterceptorResult(InterceptorState.CONTINUE); }
PreMatchingInterceptor implements ExecutionPreProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args) { if (matcher == null || matcher.matches(ctx, key, args)) { return preProcessor.invoke(ctx, key, args); } return new InterceptorResult(InterceptorState.CONTINUE); } }
PreMatchingInterceptor implements ExecutionPreProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args) { if (matcher == null || matcher.matches(ctx, key, args)) { return preProcessor.invoke(ctx, key, args); } return new InterceptorResult(InterceptorState.CONTINUE); } PreMatchingInterceptor(ExecutionPreProcessor preProcessor); }
PreMatchingInterceptor implements ExecutionPreProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args) { if (matcher == null || matcher.matches(ctx, key, args)) { return preProcessor.invoke(ctx, key, args); } return new InterceptorResult(InterceptorState.CONTINUE); } PreMatchingInterceptor(ExecutionPreProcessor preProcessor); @Override InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args); @Override String getName(); void setMatcher(Matcher matcher); @Override ExecutionRequirement getExecutionRequirement(); }
PreMatchingInterceptor implements ExecutionPreProcessor { @Override public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args) { if (matcher == null || matcher.matches(ctx, key, args)) { return preProcessor.invoke(ctx, key, args); } return new InterceptorResult(InterceptorState.CONTINUE); } PreMatchingInterceptor(ExecutionPreProcessor preProcessor); @Override InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args); @Override String getName(); void setMatcher(Matcher matcher); @Override ExecutionRequirement getExecutionRequirement();  }