|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Responder
The Responder replies to requests about its local routing network.
Method Summary | |
---|---|
void |
activate(java.lang.String finderName)
Activate the Responder - used by the Finder. |
void |
addGoldenPath(java.util.Vector goldenPath)
Once the Finder retrieves a golden path it can report it to the Responder. |
AntResponsePair |
getNeighborsOfCurrentNode(int antID,
Location location)
Provides a vector of Locations to which the Ant can move, or kills the ant. |
void |
increaseRoundNumber()
Increases the round number (The first round is 1). |
void |
resolveGoldenPaths()
Asks the Responder to check if all the paths that have been previously supplied to it are valid. |
int |
updateAntLocation(int antID,
Location newLocation)
Updates the Locations of the Ant in the network. |
Method Detail |
---|
void activate(java.lang.String finderName) throws java.rmi.RemoteException
finderName
- The name of the Finder.
java.rmi.RemoteException
- There is no RMI communicationvoid increaseRoundNumber() throws java.rmi.RemoteException
java.rmi.RemoteException
- There is no RMI communicationAntResponsePair getNeighborsOfCurrentNode(int antID, Location location) throws java.rmi.RemoteException
location
- The current location of ant.antID
- The ant's ID (a number between 1 to 30).
java.rmi.RemoteException
- There is no RMI connectionint updateAntLocation(int antID, Location newLocation) throws java.rmi.RemoteException
antID
- The ant's ID (a number between 1 to 30).newLocation
- The new location of the Ant.
java.rmi.RemoteException
- There is no RMI connectionvoid addGoldenPath(java.util.Vector goldenPath) throws java.rmi.RemoteException
goldenPath
- A Vector of Locations in the golden path. The Locations
are ordered from source to destination such that goldenPath.get(0) is the
source and goldenPath.lastElement() is the destination.
java.rmi.RemoteException
void resolveGoldenPaths() throws java.rmi.RemoteException
java.rmi.RemoteException
- There is no RMI connection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |