jpl.mipl.pgs.jbpm.exe
Class AbstractDefaultTaskImplementation

java.lang.Object
  extended by jpl.mipl.pgs.jbpm.exe.AbstractDefaultTaskImplementation
All Implemented Interfaces:
Runnable, Task
Direct Known Subclasses:
CheckInputsChanged, CheckL1BSuccessValue, DivRunTasks, McsRunTasks, MslTask, PhxCheckMosaicProjectionType, PhxCheckMosaicType, PhxCheckObservationType, PhxCheckType, PhxPublish, PhxRunTasks, PhxStereo2Trigger, PhxStereoTrigger, ScriptTask, TafTask, Task1, Task2

public abstract class AbstractDefaultTaskImplementation
extends Object
implements Task

Provides a default implementation of the Task interface.


      Copyright 2004-2006, California Institute of Technology.
      ALL RIGHTS RESERVED.
      U.S. Government Sponsorship acknowledge.
  

Author:
rrp

Field Summary
protected  TaskRunner caller
           
protected  org.jbpm.graph.exe.ExecutionContext executionContext
           
protected  Logger logger
          The following logger is used by all components of the pgs.jbpm package.
protected  String taskName
           
protected  String taskParams
           
 
Constructor Summary
AbstractDefaultTaskImplementation()
           
 
Method Summary
 void init(TaskRunner incaller, String intaskName, String intaskParams, org.jbpm.graph.exe.ExecutionContext context)
          This method is called before the run method of this class.
abstract  void run()
          It is wise to wrap this method with a try/catch block that catches Throwable to avoid uncaught runtime exceptions.
protected  void taskCompleted(boolean normalCompletion)
          Call this method at the end of the run method.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected Logger logger
The following logger is used by all components of the pgs.jbpm package.


caller

protected TaskRunner caller

taskName

protected String taskName

taskParams

protected String taskParams

executionContext

protected org.jbpm.graph.exe.ExecutionContext executionContext
Constructor Detail

AbstractDefaultTaskImplementation

public AbstractDefaultTaskImplementation()
Method Detail

init

public void init(TaskRunner incaller,
                 String intaskName,
                 String intaskParams,
                 org.jbpm.graph.exe.ExecutionContext context)
          throws Exception
Description copied from interface: Task
This method is called before the run method of this class.

Specified by:
init in interface Task
Parameters:
incaller - The task runner that is responsible for running this task. NOTE: It is the task's responsibility to call the TaskRunner.taskCompleted(boolean) method once the run methods completes.
intaskName - A meaningful name of this task.
intaskParams - A stringified version of the UPF file.
context - The execution context.
Throws:
Exception

run

public abstract void run()
It is wise to wrap this method with a try/catch block that catches Throwable to avoid uncaught runtime exceptions.

Specified by:
run in interface Runnable

taskCompleted

protected void taskCompleted(boolean normalCompletion)
Call this method at the end of the run method. This method invokes the TaskRunner.taskCompleted(boolean) method.


toString

public String toString()
Overrides:
toString in class Object