@@ -0,0 +1,1794 @@
+package permafrost.tundra.server.invoke;%0A%0Aimport com.wm.app.b2b.server.BaseService;%0Aimport com.wm.app.b2b.server.invoke.InvokeChainProcessor;%0Aimport com.wm.app.b2b.server.invoke.InvokeManager;%0Aimport com.wm.app.b2b.server.invoke.ServiceStatus;%0Aimport com.wm.data.IData;%0Aimport com.wm.util.ServerException;%0Aimport java.util.Iterator;%0A%0A/**%0A * An abstract base class for invoke chain processors.%0A */%0Apublic abstract class AbstractInvokeChainProcessor implements InvokeChainProcessor %7B%0A    /**%0A     * Whether the processor is started or not.%0A     */%0A    protected volatile boolean started = false;%0A%0A    /**%0A     * Processes a service invocation.%0A     *%0A     * @param iterator          Invocation chain.%0A     * @param baseService       The invoked service.%0A     * @param pipeline          The input pipeline for the service.%0A     * @param serviceStatus     The status of the service invocation.%0A     * @throws ServerException  If the service invocation fails.%0A     */%0A    @Override%0A    public void process(Iterator iterator, BaseService baseService, IData pipeline, ServiceStatus serviceStatus) throws ServerException %7B%0A        if (iterator.hasNext()) ((InvokeChainProcessor)iterator.next()).process(iterator, baseService, pipeline, serviceStatus);%0A    %7D%0A%0A    /**%0A     * Registers this class as an invocation handler and starts saving pipelines.%0A     */%0A    public synchronized void start() %7B%0A        if (!started) %7B%0A            started = true;%0A            InvokeManager.getDefault().registerProcessor(this);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Unregisters this class as an invocation handler and stops saving pipelines.%0A     */%0A    public synchronized void stop() %7B%0A        if (started) %7B%0A            started = false;%0A            InvokeManager.getDefault().unregisterProcessor(this);%0A        %7D%0A    %7D%0A%7D%0A

Add AbstractInvokeChainProcessor class to refactor common code into this superclass