|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcore.VSTaskManager
public class VSTaskManager
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.
| Field Summary | |
|---|---|
static boolean |
ONLY_ONCE
The Constant ONLY_ONCE. |
static boolean |
PROGRAMMED
The Constant PROGRAMMED. |
| Constructor Summary | |
|---|---|
VSTaskManager(VSPrefs prefs,
VSSimulatorVisualization simulatorVisualization)
Instantiates a new task manager object. |
|
| Method Summary | |
|---|---|
void |
addTask(VSTask task)
Adds a task. |
void |
addTask(VSTask task,
boolean isProgrammed)
Adds a task. |
void |
deserialize(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. |
void |
removeAllTasks(java.util.ArrayList<VSTask> tasks)
Removes several tasks. |
boolean |
removeTask(VSTask task)
Removes a task. |
void |
removeTasksOf(VSInternalProcess process)
Removes the tasks of the specified process. |
void |
reset()
Resets the task manager. |
void |
runTasks(long step,
long offset,
long lastGlobalTime)
Run tasks. |
void |
serialize(VSSerialize serialize,
java.io.ObjectOutputStream objectOutputStream)
Serializes |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final boolean PROGRAMMED
public static final boolean ONLY_ONCE
| Constructor Detail |
|---|
public VSTaskManager(VSPrefs prefs,
VSSimulatorVisualization simulatorVisualization)
prefs - the simulator's default prefssimulatorVisualization - the simulator canvas| Method Detail |
|---|
public void runTasks(long step,
long offset,
long lastGlobalTime)
step - the stepoffset - the offsetlastGlobalTime - the last global timepublic void reset()
public void addTask(VSTask task)
task - the task to add
public void addTask(VSTask task,
boolean isProgrammed)
task - the task to addisProgrammed - true, if the task is programmedpublic boolean removeTask(VSTask task)
task - the task to remove
public void removeAllTasks(java.util.ArrayList<VSTask> tasks)
tasks - the tasks to removepublic void removeTasksOf(VSInternalProcess process)
process - the process to remove the tasks ofpublic java.util.ArrayList<VSTask> getLocalTasks()
public java.util.ArrayList<VSTask> getGlobalTasks()
public java.util.ArrayList<VSTask> getProcessLocalTasks(VSInternalProcess process)
process - the process to get the local timed tasks of
public java.util.ArrayList<VSTask> getProcessGlobalTasks(VSInternalProcess process)
process - the process to get the local timed tasks of
public java.lang.String toString()
toString in class java.lang.Object
public void serialize(VSSerialize serialize,
java.io.ObjectOutputStream objectOutputStream)
throws java.io.IOException
VSSerializable
serialize in interface VSSerializableserialize - The serialize objectobjectOutputStream - The object output stream
java.io.IOException
public void deserialize(VSSerialize serialize,
java.io.ObjectInputStream objectInputStream)
throws java.io.IOException,
java.lang.ClassNotFoundException
VSSerializable
deserialize in interface VSSerializableserialize - The serialize objectobjectInputStream - The object input stream
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||