Hi,
Some additional clarifications:
Agent.doDelete() triggers the agent termination. Note however that doDelete() just sets an internal flag so that, as soon as the currently running behavior completes, the agent termination takes place.
So for instance the code below prints "I am still running" even if this printout occurs after calling doDelete()
...
public void setup() {
addBehaviour(new OneShotBehaviour(this) {
public void action() {
myAgent.doDelete();
System.out.println("I am still running");
}
});
}
When the agent termination takes place, the last operation executed by the agent internal Thread is the invocation of the agent takeDown() method. So takeDown() is automatically invoked by the underlying JADE runtime and should not be called explicitly.
A complete explanation of the agent life cycle can be found in the JADE Programming Tutorial for Beginners (sections 3 and 4 in particular).
Bye,
Giovanni
Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Dmontier Arag?o
Inviato: mercoled? 15 gennaio 2014 00:19
A: mr.nauman9
Cc: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] Killing Agent in container
You're right. Have you could take a look in the section 3.2.1.2 (Stopping agent execution) of the programmers guide?
An agent really ends when the method takeDown() is executed, maybe this help you.
-----------------------------------------------
Dmontier Pinheiro Arag?o Junior
Degree Computer Sciences (UFC)
Ms Transports Engineering (UFC)
Studying PhD Industrial Engineering (UFSC)
Email / Gtalk: dmontier at gmail.com<mailto:dmontier at gmail.com>
Skype: dmontieraragao
2014/1/14 mr.nauman9 <mr.nauman9 at gmail.com<mailto:mr.nauman9 at gmail.com>>
actually agents executes after dodelete() method. I want agent to stop
executing and terminate in all aspects.
--
View this message in context: http://jade.17737.x6.nabble.com/Killing-Agent-in-container-tp5002404p5002406.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com<mailto:jade-develop at avalon.tilab.com>
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140115/04c1802b/attachment.html>