|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcore.VSTask
public class VSTask
The class VSTask, an object of this class represents a task to do or done. All tasks are managed by the task manager. There are local and global timed tasks. Local timed tasks are being fullfilled if the process' local time is reached. Global timed tasks are being fullfilled if the simulator's time is reached.
| Field Summary | |
|---|---|
static boolean |
GLOBAL
The Constant GLOBAL. |
static boolean |
LOCAL
The Constant LOCAL. |
| Constructor Summary | |
|---|---|
VSTask(long taskTime,
VSInternalProcess process,
VSAbstractEvent event,
boolean isLocal)
Instantiates a new task. |
|
VSTask(VSSerialize serialize,
java.io.ObjectInputStream objectInputStream)
Instantiates a new task during a deserialization. |
|
VSTask(VSTask task)
Instantiates a new task, it's a copy constructor. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object object)
|
void |
deserialize(VSSerialize serialize,
java.io.ObjectInputStream objectInputStream)
Deserializes |
boolean |
equals(VSTask task)
Checks if the task equals to another task. |
VSAbstractEvent |
getEvent()
Gets the event. |
VSInternalProcess |
getProcess()
Gets the process. |
int |
getTaskNum()
Gets the task num. |
long |
getTaskTime()
Gets the task time. |
boolean |
hasInternalEvent()
Checks if the task is using an "internal event". |
boolean |
hasMessageReceiveEvent()
Checks if the task is a message receive event. |
boolean |
hasNotSerializableEvent()
Checks if the task should not get serialized. |
boolean |
hasProcessRecoverEvent()
Checks if the task is a process recover event. |
boolean |
isGlobalTimed()
Checks if the task is global timed. |
boolean |
isProcess(VSInternalProcess process)
Checks if the task belongs to the specified process. |
boolean |
isProgrammed()
Checks if the task is programmed. |
void |
isProgrammed(boolean isProgrammed)
Sets if the task is programmed. |
boolean |
isProtocol(VSAbstractProtocol protocol)
Checks if the task belongs to the specified protocol object. |
void |
run()
Runs the task. |
void |
serialize(VSSerialize serialize,
java.io.ObjectOutputStream objectOutputStream)
Serializes |
void |
setProcess(VSInternalProcess process)
Sets the process. |
void |
setTaskTime(long taskTime)
Sets the task time. |
boolean |
timeOver()
Checks if the task's time is over. |
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 LOCAL
public static final boolean GLOBAL
| Constructor Detail |
|---|
public VSTask(long taskTime,
VSInternalProcess process,
VSAbstractEvent event,
boolean isLocal)
taskTime - the task timeprocess - the processevent - the eventisLocal - the taks is local timedpublic VSTask(VSTask task)
task - the task to copy
public VSTask(VSSerialize serialize,
java.io.ObjectInputStream objectInputStream)
throws java.io.IOException,
java.lang.ClassNotFoundException
serialize - the serialize objectobjectInputStream - The input stream
java.io.IOException
java.lang.ClassNotFoundException| Method Detail |
|---|
public int getTaskNum()
public void isProgrammed(boolean isProgrammed)
isProgrammed - true, if the task is programmedpublic boolean isProgrammed()
public boolean hasInternalEvent()
public boolean hasNotSerializableEvent()
public boolean hasMessageReceiveEvent()
public boolean hasProcessRecoverEvent()
public boolean isProtocol(VSAbstractProtocol protocol)
protocol - the protocol object to check against.
public boolean timeOver()
public boolean equals(VSTask task)
task - the task to compare to
public boolean isProcess(VSInternalProcess process)
process - the process to check against
public boolean isGlobalTimed()
public VSInternalProcess getProcess()
public void run()
public long getTaskTime()
public void setTaskTime(long taskTime)
taskTime - the task timepublic void setProcess(VSInternalProcess process)
process - the processpublic VSAbstractEvent getEvent()
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object object)
compareTo in interface java.lang.Comparable
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 | ||||||||