com.waveset.task
Class SARunner

java.lang.Object
  extended bycom.waveset.task.Executor
      extended bycom.waveset.task.SARunner

public class SARunner
extends Executor

Must be public so that the scheduler can run this as a task.


Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.task.Executor
_monitor, _suspendRequested, _terminateRequested, trace, XML_HEADER
 
Constructor Summary
SARunner()
           
 
Method Summary
protected  void doRealWork(TaskContext ctx, TaskInstance task)
          Get the scheduling parameters for this source adapter and run it until shutdown.
 ActiveSync getSource()
           
 void requestStop()
           
 void setSuspendRequested(boolean b)
          Request suspension of the task.
 void setTerminateRequested(boolean b)
          Request termination of the task.
 
Methods inherited from class com.waveset.task.Executor
addExtendedResult, delete, execute, getExtendedResult, getPool, isSuspendRequested, isTerminateRequested, println, processEvent, setPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

SARunner

public SARunner()
Method Detail

doRealWork

protected void doRealWork(TaskContext ctx,
                          TaskInstance task)
                   throws java.lang.Exception
Get the scheduling parameters for this source adapter and run it until shutdown. This object can be pooled and reused after it completes so reset instance variables as needed.

Overrides:
doRealWork in class Executor
Throws:
java.lang.Exception

requestStop

public void requestStop()

setSuspendRequested

public void setSuspendRequested(boolean b)
Request suspension of the task. This is only a request, you cann't assume that the task has in fact suspended when the call returns. This normally sets a flag that is tested periodically, and eventually causes the execute() method to terminate.

This differs from terminate in that the intent is that the task store enough state in the task object so that it can be resumed later.

Overrides:
setSuspendRequested in class Executor

setTerminateRequested

public void setTerminateRequested(boolean b)
Request termination of the task. Similar to suspend except that the intent is that the task will not be resumed later.

Overrides:
setTerminateRequested in class Executor

getSource

public ActiveSync getSource()