List of usage examples for org.apache.commons.chain Chain execute
boolean execute(Context context) throws Exception;
Execute the processing represented by this Chain according to the following algorithm.
false
.execute()
method of each Command configured on this chain, in the order they were added via calls to the addCommand()
method, until the end of the configured Command s is encountered, or until one of the executed Command s returns true
or throws an exception.execute()
methods, starting with the last one that was executed. From source file:ttf.analysis.processor.ChainProcessor.java
@Override public void process(Article article) throws Exception { log.info("Start: " + article); Chain chain = new ChainBase(commands); AnalysisContext context = contextFactory.build(); context.setIncomingArticle(article); chain.execute(context); }