All Packages Class Hierarchy This Package Previous Next Index
Class ajanta.agent.ItinAgent
java.lang.Object
|
+----ajanta.agent.Agent
|
+----ajanta.agent.ItinAgent
- public class ItinAgent
- extends Agent
ItinAgent class extends the Agent class and abstracts the agent's mobility
into an Itinerary. An Itinerary encode the agent's migration path, hence
allows agent programmer to create a travel plan for the agent. Travel plans
are created out of certain basic migartion patterns.
- See Also:
- pattern
-
itin
-
-
ItinAgent(Credentials)
- Itinerary of the agent is set to null
-
ItinAgent(Credentials, Itinerary)
-
-
arrive()
- The arrive() method represents an entry protocol.
-
checkDepartStatus(int)
-
This method is called by depart method giving it status of next() call in depart.
-
depart()
-
The depart() method represents an exit protocol.
-
getItinerary()
- Itinerary and Credentials of the agent is set to null
-
run()
- It is a empty method which can be overridden in subclasses.
-
setItinerary(Itinerary)
- It sets the itinerary of the agent to the Itinerary object passed as argument
-
start(AgentEnv)
- After agent has been successfuly created start method is called
to launch the agent to first server in the itinerary.
itin
protected Itinerary itin
ItinAgent
public ItinAgent(Credentials cred,
Itinerary itin)
- Parameters:
- cred - Credentials object of the agent
- itin - Itinerary ( travel plan )object for the agent
ItinAgent
public ItinAgent(Credentials cred)
- Itinerary of the agent is set to null
- Parameters:
- cred - Credentials object of the agent
getItinerary
public Itinerary getItinerary()
- Itinerary and Credentials of the agent is set to null
start
public void start(AgentEnv host) throws LaunchFailedException, UnknownHostException, Exception
- After agent has been successfuly created start method is called
to launch the agent to first server in the itinerary.
- Parameters:
- host - current agent server's AgentEnv ( agent environment )object
arrive
public void arrive()
- The arrive() method represents an entry protocol. It is
automatically executed every time an agent arrives at a server.
It is an empty method, and can be overridden in subclasses to
define the application-specific entry protocol.
- Overrides:
- arrive in class Agent
depart
public final void depart()
- The depart() method represents an exit protocol. It is
automatically executed every time an agent leaves a server. If
itinerary is not yet completed then it launches the agent to the
next server in the itinerary by calling next() on Itinerary object.
This is a final method and can not be overridden in derived classes.
- Overrides:
- depart in class Agent
checkDepartStatus
public void checkDepartStatus(int status)
- This method is called by depart method giving it status of next() call in depart.
Here application specific action can be taken based on the results of
depart call.
run
public void run()
- It is a empty method which can be overridden in subclasses. This
is the default method which get executed on a server if no other
method is specified.
- Overrides:
- run in class Agent
setItinerary
public void setItinerary(Itinerary itin)
- It sets the itinerary of the agent to the Itinerary object passed as argument
All Packages Class Hierarchy This Package Previous Next Index