org.scijava.module.process
Class AbstractPreprocessorPlugin

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.module.process.AbstractPreprocessorPlugin
All Implemented Interfaces:
Cancelable, Contextual, ModulePreprocessor, ModuleProcessor, PreprocessorPlugin, SciJavaPlugin
Direct Known Subclasses:
ActiveDisplayPreprocessor, CheckInputsPreprocessor, DebugPreprocessor, FilePreprocessor, GatewayPreprocessor, InitPreprocessor, LoadInputsPreprocessor, SaveInputsPreprocessor, ServicePreprocessor, UIPreprocessor, ValidityPreprocessor

public abstract class AbstractPreprocessorPlugin
extends AbstractContextual
implements PreprocessorPlugin

Abstract base class for plugin preprocessors.

Author:
Curtis Rueden

Constructor Summary
AbstractPreprocessorPlugin()
           
 
Method Summary
 void cancel(String reason)
          Cancels the operation execution, with the given reason for doing so.
 String getCancelReason()
          Gets a message describing why the operation was canceled.
 boolean isCanceled()
          Gets whether the operation has been canceled.
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.module.process.ModuleProcessor
process
 

Constructor Detail

AbstractPreprocessorPlugin

public AbstractPreprocessorPlugin()
Method Detail

isCanceled

public boolean isCanceled()
Description copied from interface: Cancelable
Gets whether the operation has been canceled.

Specified by:
isCanceled in interface Cancelable

cancel

public void cancel(String reason)
Description copied from interface: Cancelable
Cancels the operation execution, with the given reason for doing so.

This method merely sets the operation status to canceled; it cannot necessarily stop the operation itself. That is, it is the responsibility of each individual operation to check Cancelable.isCanceled() in a timely manner during execution, and stop doing whatever it is doing if the flag has been tripped.

Specified by:
cancel in interface Cancelable
Parameters:
reason - A message describing why the operation is being canceled.

getCancelReason

public String getCancelReason()
Description copied from interface: Cancelable
Gets a message describing why the operation was canceled.

Specified by:
getCancelReason in interface Cancelable
Returns:
The reason for cancelation, which may be null if no reason was given, or if the operation was not in fact canceled.


Copyright © 2009–2014 SciJava. All rights reserved.