|
||||||||||
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 | +--ajanta.agent.JoinableAgent
It is a sub class of the ItinAgent class. Typically a splitJoin pattern is executed by an agent of JoinableAgent class. It implements the join method for its child agent to call for joining the parent agent. Moreover agent of this class always registers itself in its server's resource registry on arrival. Its child agent can thus get a reference to it when needed to report back any results. It implements Resource and AccessProtocol so that it can register itself as resource.
Field Summary |
Fields inherited from class ajanta.agent.ItinAgent |
itin |
Fields inherited from class ajanta.agent.Agent |
creatorSignature, cred, host, myRef, name, ownerSignature, status |
Constructor Summary | |
JoinableAgent(ajanta.agent.Credentials cred)
|
|
JoinableAgent(ajanta.agent.Credentials cred,
ajanta.pattern.Itinerary itin)
|
Method Summary | |
void |
actionBeforeJoin(ajanta.agent.Agent ag)
This method is executed when a child agent returns and "joins" the parent. |
void |
actionOnArrive()
Application specific actions on agent' arrival should be defined in overriden method in the derived class. |
void |
actionOnJoin()
This method gets executed by the parent agent when all of the specified child agents have joined and the desired synchronization has occured. |
void |
arrive()
The arrive() method represents an entry protocol. |
ajanta.util.Resource |
getProxy(ajanta.agent.Credentials cred)
Return a proxy of this agent |
void |
join(ajanta.agent.Agent ag)
A child agent reports its result to its parent agent by colocating with the parent agent and calling its join method on it. |
void |
registerOnArrive()
This method is called by arrive method. |
void |
report(ajanta.agent.Agent ag)
impementation specific report |
Methods inherited from class ajanta.agent.ItinAgent |
checkDepartStatus, depart, getItinerary, noOp, run, setItinerary, start |
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 |
Constructor Detail |
public JoinableAgent(ajanta.agent.Credentials cred)
cred
- Credentials object of the agentpublic JoinableAgent(ajanta.agent.Credentials cred, ajanta.pattern.Itinerary itin)
cred
- Credentials object of the agentitin
- Itinerary object for the agentMethod Detail |
public void registerOnArrive()
public void actionOnArrive()
public final void arrive()
arrive
in class ItinAgent
public void report(ajanta.agent.Agent ag)
Reportable
report
in interface Reportable
ag
- - the agent repotingpublic void join(ajanta.agent.Agent ag)
join
in interface Joinable
public ajanta.util.Resource getProxy(ajanta.agent.Credentials cred)
getProxy
in interface AccessProtocol
cred
- Credentials object of the callerpublic void actionOnJoin()
public void actionBeforeJoin(ajanta.agent.Agent ag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |