|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvisidia.simulation.process.ProcessType
visidia.simulation.process.MessageProcess
public class MessageProcess
This class represents a communication process based on message passing.
| Field Summary | |
|---|---|
protected VQueue |
msgVQueue
The message queue. |
| Fields inherited from class visidia.simulation.process.ProcessType |
|---|
id, server |
| Constructor Summary | |
|---|---|
MessageProcess(Server server,
Vertex vertex)
Instantiates a new message process. |
|
| Method Summary | |
|---|---|
boolean |
emptyVQueue(Criterion c)
Tests if the message VQueue is empty. |
Algorithm |
getAlgorithm()
Gets the algorithm. |
Message |
getNextMessage(Door door,
Criterion c)
Gets the next message received on the specified door (if any) corresponding to the criterion (if any). |
MessagePacket |
getNextMessagePacketNoWait(Criterion c)
Gets the next message packet matching the criterion. |
java.lang.Object |
getNodeProperty(java.lang.String key)
Gets the node property. |
Vertex |
getVertex()
Gets the vertex. |
void |
initNodeProperty(VisidiaProperty property)
Initializes the node property. |
void |
putMessage(MessagePacket msgPacket)
Puts message on the queue. |
boolean |
sendMessageTo(int door,
Message msg)
Sends a message. |
void |
setAlgorithm(Algorithm algorithm)
Sets the algorithm. |
void |
setNodeProperty(int nodeId,
VisidiaProperty property)
Sets the node property. |
void |
start()
Starts the process. |
void |
terminatedAlgorithm()
Terminated algorithm. |
| Methods inherited from class visidia.simulation.process.ProcessType |
|---|
changeEdgeState, getEdgeProperty, getId, getServer, runningControl, setEdgeProperty, setEdgeProperty, setThread, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected VQueue msgVQueue
| Constructor Detail |
|---|
public MessageProcess(Server server,
Vertex vertex)
server - the serververtex - the vertex| Method Detail |
|---|
public Algorithm getAlgorithm()
public void setAlgorithm(Algorithm algorithm)
algorithm - the new algorithmpublic Vertex getVertex()
public void start()
ProcessType
start in class ProcessType
public boolean sendMessageTo(int door,
Message msg)
throws java.lang.InterruptedException
door - the doormsg - the message
java.lang.InterruptedException - the interrupted exception
public Message getNextMessage(Door door,
Criterion c)
throws java.lang.InterruptedException
c - the criteriondoor - the door
java.lang.InterruptedException - the interrupted exception
public MessagePacket getNextMessagePacketNoWait(Criterion c)
throws java.lang.InterruptedException
c - the criterion
java.lang.InterruptedException - the interrupted exception
public void putMessage(MessagePacket msgPacket)
throws java.lang.InterruptedException
msgPacket - the message packet
java.lang.InterruptedException - the interrupted exception
public void terminatedAlgorithm()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exception
public boolean emptyVQueue(Criterion c)
throws java.lang.InterruptedException
c - the criterion
java.lang.InterruptedException - the interrupted exceptionpublic void initNodeProperty(VisidiaProperty property)
property - the property
public void setNodeProperty(int nodeId,
VisidiaProperty property)
throws java.lang.InterruptedException
nodeId - the node idproperty - the property
java.lang.InterruptedException - the interrupted exceptionpublic java.lang.Object getNodeProperty(java.lang.String key)
key - the key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||