From afed274c10a93957f82a009824cafe8d83aa68a8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 15 Aug 2008 04:09:42 +0000 Subject: new branches --- VS-Sim-Javadoc/core/VSTaskManager.html | 668 +++++++++++++++++++++++++++++++++ 1 file changed, 668 insertions(+) create mode 100644 VS-Sim-Javadoc/core/VSTaskManager.html (limited to 'VS-Sim-Javadoc/core/VSTaskManager.html') diff --git a/VS-Sim-Javadoc/core/VSTaskManager.html b/VS-Sim-Javadoc/core/VSTaskManager.html new file mode 100644 index 0000000..c740f1b --- /dev/null +++ b/VS-Sim-Javadoc/core/VSTaskManager.html @@ -0,0 +1,668 @@ + + + + + + +VSTaskManager + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +core +
+Class VSTaskManager

+
+java.lang.Object
+  extended by core.VSTaskManager
+
+
+
All Implemented Interfaces:
VSSerializable
+
+
+
+
public class VSTaskManager
extends java.lang.Object
implements VSSerializable
+ + +

+The class VSTaskManager, it is responsible that all tasks will get + fullfilled in the correct order. Please also read the javadoc of the VSTask + class. It describes the difference between local and global timed tasks. +

+ +

+

+
Author:
+
Paul C. Buetow
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+static booleanONLY_ONCE + +
+          The Constant ONLY_ONCE.
+static booleanPROGRAMMED + +
+          The Constant PROGRAMMED.
+  + + + + + + + + + + +
+Constructor Summary
VSTaskManager(VSPrefs prefs, + VSSimulatorVisualization simulatorVisualization) + +
+          Instantiates a new task manager object.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddTask(VSTask task) + +
+          Adds a task.
+ voidaddTask(VSTask task, + boolean isProgrammed) + +
+          Adds a task.
+ voiddeserialize(VSSerialize serialize, + java.io.ObjectInputStream objectInputStream) + +
+          Deserializes
+ java.util.ArrayList<VSTask>getGlobalTasks() + +
+          Gets the global timed tasks.
+ java.util.ArrayList<VSTask>getLocalTasks() + +
+          Gets the local timed tasks.
+ java.util.ArrayList<VSTask>getProcessGlobalTasks(VSInternalProcess process) + +
+          Gets the global timed tasks of a specific process.
+ java.util.ArrayList<VSTask>getProcessLocalTasks(VSInternalProcess process) + +
+          Gets the local timed tasks of a specific process.
+ voidremoveAllTasks(java.util.ArrayList<VSTask> tasks) + +
+          Removes several tasks.
+ booleanremoveTask(VSTask task) + +
+          Removes a task.
+ voidremoveTasksOf(VSInternalProcess process) + +
+          Removes the tasks of the specified process.
+ voidreset() + +
+          Resets the task manager.
+ voidrunTasks(long step, + long offset, + long lastGlobalTime) + +
+          Run tasks.
+ voidserialize(VSSerialize serialize, + java.io.ObjectOutputStream objectOutputStream) + +
+          Serializes
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+PROGRAMMED

+
+public static final boolean PROGRAMMED
+
+
The Constant PROGRAMMED. +

+

+
See Also:
Constant Field Values
+
+
+ +

+ONLY_ONCE

+
+public static final boolean ONLY_ONCE
+
+
The Constant ONLY_ONCE. +

+

+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+VSTaskManager

+
+public VSTaskManager(VSPrefs prefs,
+                     VSSimulatorVisualization simulatorVisualization)
+
+
Instantiates a new task manager object. +

+

+
Parameters:
prefs - the simulator's default prefs
simulatorVisualization - the simulator canvas
+
+ + + + + + + + +
+Method Detail
+ +

+runTasks

+
+public void runTasks(long step,
+                     long offset,
+                     long lastGlobalTime)
+
+
Run tasks. This method gets called by the simulator canvas repeatedly. + Almost all simulator actions take place in this method. +

+

+
+
+
+
Parameters:
step - the step
offset - the offset
lastGlobalTime - the last global time
+
+
+
+ +

+reset

+
+public void reset()
+
+
Resets the task manager. +

+

+
+
+
+
+
+
+
+ +

+addTask

+
+public void addTask(VSTask task)
+
+
Adds a task. +

+

+
+
+
+
Parameters:
task - the task to add
+
+
+
+ +

+addTask

+
+public void addTask(VSTask task,
+                    boolean isProgrammed)
+
+
Adds a task. +

+

+
+
+
+
Parameters:
task - the task to add
isProgrammed - true, if the task is programmed
+
+
+
+ +

+removeTask

+
+public boolean removeTask(VSTask task)
+
+
Removes a task. +

+

+
+
+
+
Parameters:
task - the task to remove +
Returns:
true, if the task has been removed with success
+
+
+
+ +

+removeAllTasks

+
+public void removeAllTasks(java.util.ArrayList<VSTask> tasks)
+
+
Removes several tasks. +

+

+
+
+
+
Parameters:
tasks - the tasks to remove
+
+
+
+ +

+removeTasksOf

+
+public void removeTasksOf(VSInternalProcess process)
+
+
Removes the tasks of the specified process. +

+

+
+
+
+
Parameters:
process - the process to remove the tasks of
+
+
+
+ +

+getLocalTasks

+
+public java.util.ArrayList<VSTask> getLocalTasks()
+
+
Gets the local timed tasks. +

+

+
+
+
+ +
Returns:
the local timed tasks
+
+
+
+ +

+getGlobalTasks

+
+public java.util.ArrayList<VSTask> getGlobalTasks()
+
+
Gets the global timed tasks. +

+

+
+
+
+ +
Returns:
the global timed tasks
+
+
+
+ +

+getProcessLocalTasks

+
+public java.util.ArrayList<VSTask> getProcessLocalTasks(VSInternalProcess process)
+
+
Gets the local timed tasks of a specific process. +

+

+
+
+
+
Parameters:
process - the process to get the local timed tasks of +
Returns:
the local tasks of the specified process
+
+
+
+ +

+getProcessGlobalTasks

+
+public java.util.ArrayList<VSTask> getProcessGlobalTasks(VSInternalProcess process)
+
+
Gets the global timed tasks of a specific process. +

+

+
+
+
+
Parameters:
process - the process to get the local timed tasks of +
Returns:
the global timed tasks of the specified process
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+
+ +

+serialize

+
+public void serialize(VSSerialize serialize,
+                      java.io.ObjectOutputStream objectOutputStream)
+               throws java.io.IOException
+
+
Description copied from interface: VSSerializable
+
Serializes +

+

+
Specified by:
serialize in interface VSSerializable
+
+
+
Parameters:
serialize - The serialize object
objectOutputStream - The object output stream +
Throws: +
java.io.IOException
+
+
+
+ +

+deserialize

+
+public void deserialize(VSSerialize serialize,
+                        java.io.ObjectInputStream objectInputStream)
+                 throws java.io.IOException,
+                        java.lang.ClassNotFoundException
+
+
Description copied from interface: VSSerializable
+
Deserializes +

+

+
Specified by:
deserialize in interface VSSerializable
+
+
+
Parameters:
serialize - The serialize object
objectInputStream - The object input stream +
Throws: +
java.io.IOException +
java.lang.ClassNotFoundException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3