3daenzeroramapackage org.mindswap.owls.process.execution;
3daenzerorama
3daenzeroramaimport java.io.PrintWriter;
3daenzeroramaimport java.io.Writer;
3daenzerorama
3daenzeroramaimport org.mindswap.exceptions.ExecutionException;
4daenzeroramaimport org.mindswap.owls.process.AtomicProcess;
3daenzeroramaimport org.mindswap.owls.process.Process;
3daenzeroramaimport org.mindswap.query.ValueMap;
3daenzerorama
3daenzeroramapublic abstract class AbstractMonitor implements ProcessMonitor {
3daenzerorama protected PrintWriter out;
3daenzerorama protected int monitorFilter;
3daenzerorama
3daenzerorama public AbstractMonitor() {
3daenzerorama this(new PrintWriter(System.out));
3daenzerorama }
3daenzerorama
3daenzerorama public AbstractMonitor(Writer writer) {
3daenzerorama monitorFilter = Process.ANY;
3daenzerorama
3daenzerorama setWriter( writer );
3daenzerorama }
3daenzerorama
3daenzerorama public void executionContinued(Process process) {
3daenzerorama }
3daenzerorama
3daenzerorama public void executionFailed(ExecutionException e) {
3daenzerorama }
3daenzerorama
3daenzerorama public void executionFinished() {
3daenzerorama }
3daenzerorama
3daenzerorama public void executionFinished(Process process, ValueMap inputs, ValueMap outputs) {
3daenzerorama }
3daenzerorama
4daenzerorama public void executionInterrupted(Process process, AtomicProcess atomicProcess) {
3daenzerorama }
3daenzerorama
3daenzerorama public void executionStarted() {
3daenzerorama }
3daenzerorama
3daenzerorama public void executionStarted(Process process, ValueMap inputs) {
3daenzerorama }
3daenzerorama
3daenzerorama public void intermediateResultsReceived(ValueMap values) {
3daenzerorama }
3daenzerorama
3daenzerorama public int getMonitorFilter() {
3daenzerorama return monitorFilter;
3daenzerorama }
3daenzerorama
3daenzerorama public void setMonitorFilter(int processType) {
3daenzerorama this.monitorFilter = processType;
3daenzerorama }
3daenzerorama
3daenzerorama private void setWriter( Writer writer ) {
3daenzerorama this.out = (writer instanceof PrintWriter)
3daenzerorama ? (PrintWriter) writer
3daenzerorama : new PrintWriter( writer );
3daenzerorama }
3daenzerorama}