|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.protocol.Agent
public class Agent
Agent base class, all specific protocol agents inherit from it.
| Constructor Summary | |
|---|---|
Agent()
constructs a new Agent object with next available id |
|
Agent(int i)
constructs a new Agent object with giving id |
|
| Method Summary | |
|---|---|
void |
agentDraw(java.awt.Graphics g,
int x,
int y)
do some agent specific drawing on the graph to be implemented in sub class |
void |
attachTo(Node n)
attach this agent to a node |
int |
getID()
gets agent id, agent id is different from node id |
Node |
getNode()
gets the node that this agent is attached to |
boolean |
handle(SimEvent e)
handles agent level event |
boolean |
isActive()
check activity |
void |
reset()
dettach from the node |
java.lang.String |
toString()
generates string description |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Agent()
public Agent(int i)
| Method Detail |
|---|
public int getID()
public void attachTo(Node n)
n - the node to be attachedpublic Node getNode()
public void agentDraw(java.awt.Graphics g,
int x,
int y)
public boolean isActive()
public boolean handle(SimEvent e)
handle in interface SimEventHandlere - the event to be handled
public java.lang.String toString()
toString in class java.lang.Objectpublic void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||