use of loghub.Processor in project LogHub by fbacchella.
the class Configuration method getProcessor.
private Processor getProcessor(ConfigListener.Pipenode i, String currentPipeLineName, int depth, AtomicInteger subPipeLine) throws ConfigException {
Processor t;
if (i instanceof ConfigListener.PipeRef) {
ConfigListener.PipeRef cpr = (ConfigListener.PipeRef) i;
NamedSubPipeline pr = new NamedSubPipeline();
pr.setPipeRef(cpr.pipename);
t = pr;
} else if (i instanceof ConfigListener.PipenodesList) {
subPipeLine.incrementAndGet();
AnonymousSubPipeline subpipe = new AnonymousSubPipeline();
Pipeline p = parsePipeline((ConfigListener.PipenodesList) i, currentPipeLineName, depth + 1, subPipeLine);
subpipe.setPipeline(p);
t = subpipe;
} else if (i instanceof ConfigListener.ProcessorInstance) {
ConfigListener.ProcessorInstance ti = (ConfigListener.ProcessorInstance) i;
t = (Processor) parseObjectDescription(ti, emptyConstructor, currentPipeLineName, depth, subPipeLine);
} else {
throw new RuntimeException("Unreachable code for " + i);
}
return t;
}
Aggregations