|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ajanta.agent.Agent | +--ajanta.agent.ItinAgent
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.
ajanta.pattern
,
Serialized FormField Summary | |
ajanta.pattern.Itinerary |
itin
|
Fields inherited from class ajanta.agent.Agent |
creatorSignature, cred, host, myRef, name, ownerSignature, status |
Constructor Summary | |
ItinAgent(ajanta.agent.Credentials cred)
Itinerary of the agent is set to null |
|
ItinAgent(ajanta.agent.Credentials cred,
ajanta.pattern.Itinerary itin)
|
Method Summary | |
void |
arrive()
The arrive() method represents an entry protocol. |
void |
checkDepartStatus(int status)
This method is called by depart method giving it status of next() call in depart. |
void |
depart()
The depart() method represents an exit protocol. |
ajanta.pattern.Itinerary |
getItinerary()
Itinerary and Credentials of the agent is set to null |
void |
noOp()
|
void |
run()
It is a empty method which can be overridden in subclasses. |
void |
setItinerary(ajanta.pattern.Itinerary itin)
It sets the itinerary of the agent to the Itinerary object passed as argument |
void |
start(ajanta.server.AgentEnv host)
After agent has been successfuly created start method is called to launch the agent to first server in the itinerary. |
Methods inherited from class ajanta.agent.Agent |
agentEntry, agentExit, colocate, colocate, meet, recallCommand, signCreator, signOwner, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public ajanta.pattern.Itinerary itin
Constructor Detail |
public ItinAgent(ajanta.agent.Credentials cred, ajanta.pattern.Itinerary itin)
cred
- Credentials object of the agentitin
- Itinerary ( travel plan )object for the agentpublic ItinAgent(ajanta.agent.Credentials cred)
cred
- Credentials object of the agentMethod Detail |
public ajanta.pattern.Itinerary getItinerary()
public final void start(ajanta.server.AgentEnv host) throws LaunchFailedException, java.net.UnknownHostException, java.lang.Exception
host
- current agent server's AgentEnv ( agent environment )object
LaunchFailedException
java.net.UnknownHostException
java.lang.Exception
public void arrive()
arrive
in class Agent
public final void depart()
depart
in class Agent
public void checkDepartStatus(int status)
public void run()
run
in class Agent
public final void noOp()
public void setItinerary(ajanta.pattern.Itinerary itin)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |