|
||||||||||
| 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.AgentProcess
public class AgentProcess
This class represents a communication process based on mobile agents.
| Field Summary |
|---|
| Fields inherited from class visidia.simulation.process.ProcessType |
|---|
id, server |
| Constructor Summary | |
|---|---|
AgentProcess(Server server,
Vertex vertex,
int id)
Instantiates a new agent process. |
|
| Method Summary | |
|---|---|
void |
deadAgent()
Dead agent. |
Agent |
getAgent()
Gets the agent. |
Vertex |
getDestinationVertex()
Gets the destination vertex. |
Vertex |
getOriginVertex()
Gets the origin vertex. |
void |
moveAgentTo(Agent ag,
int door)
Moves an Agent to a specified door. |
void |
setAgent(Agent agent)
Sets the agent. |
void |
setDestinationVertex(Vertex destination)
Sets the destination vertex. |
void |
setOriginVertex(Vertex origin)
Sets the origin vertex. |
void |
sleep(Agent ag,
int milliseconds)
Makes the specified agent fall asleep for a given amount of milliseconds. |
| Methods inherited from class visidia.simulation.process.ProcessType |
|---|
changeEdgeState, getEdgeProperty, getId, getServer, runningControl, setEdgeProperty, setEdgeProperty, setThread, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentProcess(Server server,
Vertex vertex,
int id)
server - the serververtex - the vertexid - the id| Method Detail |
|---|
public Agent getAgent()
public void setAgent(Agent agent)
agent - the new agentpublic Vertex getOriginVertex()
public Vertex getDestinationVertex()
public void setOriginVertex(Vertex origin)
origin - the new origin vertexpublic void setDestinationVertex(Vertex destination)
destination - the new destination vertex
public void deadAgent()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exception
public void moveAgentTo(Agent ag,
int door)
throws java.lang.InterruptedException
ag - the Agent you want to movedoor - the door to which you want to move the Agent
java.lang.InterruptedException - the interrupted exception
public void sleep(Agent ag,
int milliseconds)
throws java.lang.InterruptedException
ag - Agent given to fall asleepmilliseconds - the milliseconds
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||