@Test public void testCounterServiceWithOperationFilters() throws Throwable { Service counterService = createCounterService(); OperationProcessingChain opProcessingChain = OperationProcessingChain.create( new OperationLogger()); counterService.setOperationProcessingChain(opProcessingChain); for (int i = 0; i < COUNT; i++) { incrementCounter(false); } int counter = getCounter(); assertEquals(COUNT, counter); this.host.setOperationTimeOutMicros(TimeUnit.MILLISECONDS.toMicros(250)); opProcessingChain = OperationProcessingChain.create( new OperationLogger(), new OperationPatchDropper()); counterService.setOperationProcessingChain(opProcessingChain); incrementCounter(true); counter = getCounter(); assertEquals(COUNT, counter); }
public static OperationProcessingChain create(Filter... filters) { OperationProcessingChain opProcessingChain = new OperationProcessingChain(); for (Filter filter : filters) { filter.init(); opProcessingChain.filters.add(filter); } return opProcessingChain; }
OperationProcessingChain { public static OperationProcessingChain create(Filter... filters) { OperationProcessingChain opProcessingChain = new OperationProcessingChain(); for (Filter filter : filters) { filter.init(); opProcessingChain.filters.add(filter); } return opProcessingChain; } }
OperationProcessingChain { public static OperationProcessingChain create(Filter... filters) { OperationProcessingChain opProcessingChain = new OperationProcessingChain(); for (Filter filter : filters) { filter.init(); opProcessingChain.filters.add(filter); } return opProcessingChain; } private  OperationProcessingChain(); }
OperationProcessingChain { public static OperationProcessingChain create(Filter... filters) { OperationProcessingChain opProcessingChain = new OperationProcessingChain(); for (Filter filter : filters) { filter.init(); opProcessingChain.filters.add(filter); } return opProcessingChain; } private  OperationProcessingChain(); OperationProcessingContext createContext(ServiceHost host); OperationProcessingChain setLogLevel(Level logLevel); OperationProcessingChain toggleLogging(boolean loggingEnabled); OperationProcessingChain setLogFilter(Predicate<Operation> logFilter); static OperationProcessingChain create(Filter... filters); void close(); void processRequest(Operation op, OperationProcessingContext context,
            Consumer<Operation> operationConsumer); void resumeProcessingRequest(Operation op, OperationProcessingContext context,
            FilterReturnCode filterReturnCode, Throwable e); }
OperationProcessingChain { public static OperationProcessingChain create(Filter... filters) { OperationProcessingChain opProcessingChain = new OperationProcessingChain(); for (Filter filter : filters) { filter.init(); opProcessingChain.filters.add(filter); } return opProcessingChain; } private  OperationProcessingChain(); OperationProcessingContext createContext(ServiceHost host); OperationProcessingChain setLogLevel(Level logLevel); OperationProcessingChain toggleLogging(boolean loggingEnabled); OperationProcessingChain setLogFilter(Predicate<Operation> logFilter); static OperationProcessingChain create(Filter... filters); void close(); void processRequest(Operation op, OperationProcessingContext context,
            Consumer<Operation> operationConsumer); void resumeProcessingRequest(Operation op, OperationProcessingContext context,
            FilterReturnCode filterReturnCode, Throwable e);  }