|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--agent.Agent | +--agent.User
This class represents a user on the map. A user is an agent which has a corresponding ipaq application that it sends data to via a port & socket. When a user changes location it sends its new gps position to its port so that the ipaq application can get it.
Field Summary | |
private int |
port
The port to open a socket and send data to. |
Fields inherited from class agent.Agent |
|
Constructor Summary | |
User(int p)
This constructor initializes the user. |
|
User(java.awt.Point l,
int p)
This constructor initializes the user. |
|
User(java.lang.String n,
java.awt.Point l,
int p)
This constructor initializes the user. |
Method Summary | |
int |
getPort()
This method returns the port this user is using. |
void |
setPort(int p)
This method sets the port to be used by this user. |
Methods inherited from class agent.Agent |
getLocation, getName, getPosition, getRange, setLocation, setName, setPosition, setRange |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int port
Constructor Detail |
public User(java.lang.String n, java.awt.Point l, int p)
n
- The name of the user.l
- The starting location of this user on the map.p
- The port the ipaq gps receiver is listening on.public User(java.awt.Point l, int p)
l
- The starting location of this user on the map.p
- The port the ipaq gps receiver is listening on.public User(int p)
p
- The port the ipaq gps receiver is listening on.Method Detail |
public int getPort()
public void setPort(int p)
p
- The port to set this user to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |