A D G M P Q R S

A

Agent - interface projectinfosearch.Agent.
Interface which must be implemented by AgentObject s
agentArrived(AgentServer, InetAddress, int) - Method in class projectinfosearch.AgentObject
When an AgentObject arrives at a server, this method is invoqued.
agentArrived(AgentServer, InetAddress, int) - Method in interface projectinfosearch.Agent
An agent server invokes this method.
AgentClient - class projectinfosearch.AgentClient.
An AgentClient is an application which finds servers, creates and sends an AgentObject and displays its results when it returns
AgentClient(int) - Constructor for class projectinfosearch.AgentClient
creates a DiscoveryClient, displays the running servers which were found, creates an AgentSender, displays the results of the AgentObject's "journey"
agentMigrate(AgentObject, InetAddress, int) - Method in class projectinfosearch.AgentServer
The agent wants to be sent to dstAddr and dstPort.
agentMigrate(AgentObject, InetAddress, int) - Method in interface projectinfosearch.AgentServerInt
The agent wants to be sent to dstAddr and dstPort.
AgentObject - class projectinfosearch.AgentObject.
represents a virtual agent able to travel to different servers and achieve a given task
AgentObject(InetAddress, int) - Constructor for class projectinfosearch.AgentObject
"Stores" the home address and the home port
AgentSender - class projectinfosearch.AgentSender.
An AgentSender can create and send out an agent and wait for its return.
AgentSender() - Constructor for class projectinfosearch.AgentSender
creates an AgentSender
AgentServer - class projectinfosearch.AgentServer.
An AgentServer must be "visible" and welcome agents to allow them to perform their mission
AgentServer(int) - Constructor for class projectinfosearch.AgentServer
Creates a DiscoveryServer to become visible on a given multicast group and a ServerSocket to receive agents.
AgentServerInt - interface projectinfosearch.AgentServerInt.
must be implemented by an AgentServer

D

DiscoveryClient - class projectinfosearch.DiscoveryClient.
A discovery client is able to find AgentServers
DiscoveryClient(InetAddress, int) - Constructor for class projectinfosearch.DiscoveryClient
Open a MulticastSocket for sending and receiving discovery requests and invoques the discover method
DiscoveryServer - class projectinfosearch.DiscoveryServer.
Waits for request packets and replies to them on a given multicast address and on given ports.
DiscoveryServer(InetAddress, int, int) - Constructor for class projectinfosearch.DiscoveryServer
Opens two MulticastSockets, one for receiving (basePort) and one for replying (serverPort) discovery requests.

G

getCounter() - Method in class projectinfosearch.AgentObject
returns the counter which counts the number of visited servers
getDiscoveryResult() - Method in class projectinfosearch.DiscoveryClient
Returns the Vector that contains (IP address, port)-pairs (but only from distinct servers
getFootprints() - Method in class projectinfosearch.AgentServer
optional, not implemented
getFootprints() - Method in interface projectinfosearch.AgentServerInt
optional, not implemented
getHomeAddress() - Method in class projectinfosearch.AgentObject
returns the homeAddress
getHomePort() - Method in class projectinfosearch.AgentObject
returns the homePort
getResidingAgents() - Method in class projectinfosearch.AgentServer
optional, not implemented
getResidingAgents() - Method in interface projectinfosearch.AgentServerInt
optional, not implemented
getServerNeighbors() - Method in class projectinfosearch.AgentServer
This method creates a DiscoveryClient which will find the server's neighbors
getServerNeighbors() - Method in interface projectinfosearch.AgentServerInt
This method creates a DiscoveryClient which will find the server's neighbors
getState() - Method in class projectinfosearch.AgentObject
returns the current state of the AgentObject
getSum() - Method in class projectinfosearch.AgentObject
returns the vector containing the sums computed at the visited AgentServers
getTask() - Method in class projectinfosearch.AgentObject
returns the task of the AgentObject
getVisitedServers() - Method in class projectinfosearch.AgentObject
returns the vector containing the visited AgentServers

M

main(String[]) - Static method in class projectinfosearch.AgentClient
Reads the arguments from the command line (homePort) and creates an AgentClient
main(String[]) - Static method in class projectinfosearch.AgentServer
Reads the arguments from the command line (serverPort) and creates an AgentServer, quits if the procedure is wrong (wrong serverPort or nb of arguments).

P

printDiscoveryResult(Vector) - Method in class projectinfosearch.AgentClient
prints the connected running servers
projectinfosearch - package projectinfosearch
 

Q

queryResult(int) - Method in class projectinfosearch.AgentSender
This method creates a ServerSocket which waits on the homePort.

R

ReceivingThread - class projectinfosearch.ReceivingThread.
receives an agent and helps it accomplish its task
ReceivingThread(AgentServer, Socket, int) - Constructor for class projectinfosearch.ReceivingThread
starts the run method
run() - Method in class projectinfosearch.ReceivingThread
Welcomes an agent and starts its agentArrived method
run() - Method in class projectinfosearch.AgentObject
 
run() - Method in class projectinfosearch.DiscoveryServer
Listens for discovery requests, receives and replies them.

S

sendAgent(InetAddress, int, int) - Method in class projectinfosearch.AgentSender
Opens a TCP connection to a specified AgentServer, creates an AgentObject and sends it.

A D G M P Q R S