DRCL J-Sim API

drcl.comp
Class Task

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.ACATimer
          extended bydrcl.comp.Task
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable
Direct Known Subclasses:
TaskFork, TaskNotify, TaskReceive, TaskSend, TaskSpecial

public abstract class Task
extends ACATimer

Defines a runtime task performed by a WorkerThread. A specific type of task is further defined in a subclass.

See Also:
Serialized Form

Field Summary
 Port port
          Port to which data is delivered.
 Port returnPort
          The return port for server port operation.
static int TYPE_RESUME
           
static int TYPE_RUNNABLE
           
static int TYPE_START
           
static int TYPE_STOP
           
static int TYPE_UNKNOWN
           
 
Fields inherited from class drcl.comp.ACATimer
data
 
Constructor Summary
Task()
           
 
Method Summary
static Task createNotify(java.lang.Object target_)
          Creates a special task to notify on the targeted object.
static Task createNotify(java.lang.Object target_, double time_)
          Creates a special task to notify on the targeted object.
static Task createResume(Component c_, double time_)
          Creates a special task to resume the component system.
static Task createRunnable(java.lang.Runnable r_, double time_)
          Creates a special task to execute the Runnable as a normal Java thread.
static Task createStart(Component c_, double time_)
          Creates a special task to start the component system.
static Task createStop(Component c_, double time_)
          Creates a special task to stop the component system.
abstract  void execute(WorkerThread thread_)
          Executes the task in thread_.
 
Methods inherited from class drcl.comp.ACATimer
duplicate, getTime
 
Methods inherited from class drcl.DrclObj
clone, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
See Also:
Constant Field Values

TYPE_START

public static final int TYPE_START
See Also:
Constant Field Values

TYPE_STOP

public static final int TYPE_STOP
See Also:
Constant Field Values

TYPE_RESUME

public static final int TYPE_RESUME
See Also:
Constant Field Values

TYPE_RUNNABLE

public static final int TYPE_RUNNABLE
See Also:
Constant Field Values

port

public Port port
Port to which data is delivered.


returnPort

public Port returnPort
The return port for server port operation.

Constructor Detail

Task

public Task()
Method Detail

createNotify

public static Task createNotify(java.lang.Object target_)
Creates a special task to notify on the targeted object.


createNotify

public static Task createNotify(java.lang.Object target_,
                                double time_)
Creates a special task to notify on the targeted object.


createStart

public static Task createStart(Component c_,
                               double time_)
Creates a special task to start the component system.


createStop

public static Task createStop(Component c_,
                              double time_)
Creates a special task to stop the component system.


createResume

public static Task createResume(Component c_,
                                double time_)
Creates a special task to resume the component system.


createRunnable

public static Task createRunnable(java.lang.Runnable r_,
                                  double time_)
Creates a special task to execute the Runnable as a normal Java thread.


execute

public abstract void execute(WorkerThread thread_)
Executes the task in thread_.


DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~