Пример #1
0
 @Override
 public Processor createProcessor(RouteContext routeContext) throws Exception {
   List<FilterProcessor> filters = new ArrayList<FilterProcessor>();
   for (WhenDefinition whenClaus : whenClauses) {
     filters.add(whenClaus.createProcessor(routeContext));
   }
   Processor otherwiseProcessor = null;
   if (otherwise != null) {
     otherwiseProcessor = otherwise.createProcessor(routeContext);
   }
   return new ChoiceProcessor(filters, otherwiseProcessor);
 }