|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.lang.Thread
|
+--projectinfosearch.AgentObject
represents a virtual agent able to travel to different servers and achieve a given task
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
AgentObject(java.net.InetAddress homeAddr,
int homePort)
"Stores" the home address and the home port |
|
| Method Summary | |
void |
agentArrived(AgentServer srv,
java.net.InetAddress srvInetAddress,
int serverPort)
When an AgentObject arrives at a server, this method is invoqued. |
int |
getCounter()
returns the counter which counts the number of visited servers |
java.net.InetAddress |
getHomeAddress()
returns the homeAddress |
int |
getHomePort()
returns the homePort |
java.lang.String |
getState()
returns the current state of the AgentObject |
java.util.Vector |
getSum()
returns the vector containing the sums computed at the visited AgentServers |
java.lang.String |
getTask()
returns the task of the AgentObject |
java.util.Vector |
getVisitedServers()
returns the vector containing the visited AgentServers |
void |
run()
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AgentObject(java.net.InetAddress homeAddr,
int homePort)
-homeAddr - represents the InetAddress of the AgentClient where the agent was created-homePort - represents the port number of the AgentClient where the agent was created| Method Detail |
public void agentArrived(AgentServer srv,
java.net.InetAddress srvInetAddress,
int serverPort)
agentArrived in interface Agentsrv - is an object representing an AgentServer where the AgentObject currently lives.srvInetAddress - is the InetAddress of the AgentServer where the AgentObject currently lives.serverPort - is the serverPort number of the AgentServer where the AgentObject currently lives.public void run()
run in class java.lang.Threadpublic java.net.InetAddress getHomeAddress()
public int getHomePort()
public java.lang.String getState()
public java.lang.String getTask()
public java.util.Vector getSum()
public int getCounter()
public java.util.Vector getVisitedServers()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||