02/28/2005
 

com.epicentric.task
Class SubTask

java.lang.Object
  |
  +--com.epicentric.task.SubTask

Deprecated. As of version 4.0, to be removed in 8.0 or later. It has been replaced with TaskManager

public class SubTask
extends Object

A sub-task creates the execution profile and intelligence for a single method invocation or program execution.
A subTask is created by identifying how and what to execute, and with what parameters. A subtask can be an external program invocation, a static method invocation, or an instance invocation. If an instance invocation, the subtask can contain the actual instance to invoke upon, or will attempt to instantiate it on the fly.
If the subtask contains the instance to invoke, you can choose to take advantage of the DirectTask interface to simplify the API and speed up execution. That is, if your instance implements DirectTask, it has a method boolean doTask() [no parameters]. If that's the method you want executed, setDirectInstance() and don't set any launchMethod or launchClass. If you want to execute a different method on your instance, leave launchClass blank and setLaunchMethod(). The launch method you set will be invoked even if your instance is also an implementer of DirectTask.
Parameters can be set up for the task.
Restrictions:


Field Summary
static int BOOLEAN
          Deprecated.  
static int DATE
          Deprecated.  
static boolean DEBUG
          Deprecated.  
static int DOUBLE
          Deprecated.  
static int INTEGER
          Deprecated.  
static int OBJECT
          Deprecated.  
static int STRING
          Deprecated.  
 
Constructor Summary
SubTask(Task task)
          Deprecated. Use this constructor for a task with only one subtask.
SubTask(Task task, boolean continueAfterAbend)
          Deprecated. Use this constructor for a subtask to be executed as part of a Task.
 
Method Summary
 void addParameter(Object param)
          Deprecated. Add a parameter to the set.
 boolean canBeStored()
          Deprecated. Answer whether this subtask can be stored.
 void setDirectInstance(DirectTask myInstance)
          Deprecated. Instance upon which this subtask should execute.
 void setExternalProgramName(String programName)
          Deprecated. Full path to program name to launch externally.
 void setFriendlyName(String friendlyName)
          Deprecated. Set displayable name of this subtask.
 void setLaunchClassName(String className)
          Deprecated. Set class name of method this subtask should start.
 void setLaunchMethodName(String methodName)
          Deprecated. Set method name this subtask should start on launchClassName.
 void setMyInstance(Object myInstance)
          Deprecated. Instance upon which this subtask should execute.
 String toString()
          Deprecated. String representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Deprecated. 

INTEGER

public static final int INTEGER
Deprecated. 

STRING

public static final int STRING
Deprecated. 

BOOLEAN

public static final int BOOLEAN
Deprecated. 

DOUBLE

public static final int DOUBLE
Deprecated. 

DATE

public static final int DATE
Deprecated. 

OBJECT

public static final int OBJECT
Deprecated. 
Constructor Detail

SubTask

public SubTask(Task task,
               boolean continueAfterAbend)
Deprecated. 
Use this constructor for a subtask to be executed as part of a Task.

SubTask

public SubTask(Task task)
Deprecated. 
Use this constructor for a task with only one subtask.
Method Detail

setLaunchClassName

public void setLaunchClassName(String className)
Deprecated. 
Set class name of method this subtask should start. Not necessary if starting an external program or if setting myInstance.

setLaunchMethodName

public void setLaunchMethodName(String methodName)
Deprecated. 
Set method name this subtask should start on launchClassName. Not necessary if starting an external program or if setting myInstance.

addParameter

public void addParameter(Object param)
Deprecated. 
Add a parameter to the set. Order is important, as it determines the calling signature of the method this task invokes.

setExternalProgramName

public void setExternalProgramName(String programName)
Deprecated. 
Full path to program name to launch externally. When used, you don't need to setLaunchClassName or setLaunchMethodName or setMyInstance.
Parameters:
programName -  

setMyInstance

public void setMyInstance(Object myInstance)
Deprecated. 
Instance upon which this subtask should execute. When used, you don't need to set LaunchClassName ... the class will be the class name of this instance. But you still need to setLaunchMethodName(). If your instance is an implementer of DirectTask, you do not need a method name, but should use setDirectInstance() instead of this method (though, admittedly, under the covers, it's the same thing).

setDirectInstance

public void setDirectInstance(DirectTask myInstance)
Deprecated. 
Instance upon which this subtask should execute. Since instance is an implementer of DirectTask, it can be fired directly, via its doTask() method. It does not need any fields for indirection (className or methodName).

setFriendlyName

public void setFriendlyName(String friendlyName)
Deprecated. 
Set displayable name of this subtask.

canBeStored

public boolean canBeStored()
Deprecated. 
Answer whether this subtask can be stored. We can unless we've not been given launchClassName and launchMethodName, or externalProgName.

toString

public String toString()
Deprecated. 
String representation
Overrides:
toString in class Object

02/28/2005
 

Copyright and Trademark Notices