Subject: RE: [jade-develop] About register... and handle... functions
From: Bellifemine Fabio (Fabio.Bellifemine@TILAB.COM)
Date: Fri Dec 13 2002 - 16:17:51 MET
Please read the programmer's guide, section 3.5,
"The class can be easily extended by overriding one (or all) of its handle... callback methods
which provide hooks to handle all the states of the protocol. For instance the method
handleRefuse is called when a refuse message is received.
Skilled programmers might find useful, instead of extending this class and overriding some
of its methods, registering application-specific Behaviours as handler of the states of the protocol,
including, for instance, another AchieveREInitiator behaviour to request a password before
agreeing to perform the communicative act. The methods registerHandle... allow to do that. A
mix of overridden methods and registered behaviours might often be the best solution. [...]"
http://jade.cselt.it/doc/programmersguide.pdf
> -----Original Message-----
> From: tao_gu@263.net [mailto:tao_gu@263.net]
> Sent: 13 December 2002 06:15
> To: jade-develop@sharon.cselt.it
> Subject: [jade-develop] About register... and handle... functions
>
>
> I notice that in the jade.proto package most behaviours have
> handle... functions and register... functions. I understand
> the useage of the handle functions because they are basically
> call-back function for message processing. But according to
> the JADE programmer's manual the register... functions are
> alternatives of the handle... functions and they seem more
> advanced than handle... fucntions.
>
> Can anybody tell me the mechanisms of the register...
> functions? And what is the difference between these two kinds
> of functions?
>
>
> _______________________________________________
> jade-develop mailing list
> jade-develop@sharon.cselt.it
> http://sharon.cselt.it/mailman/listinfo/jade-develop
> UNSUBSCRIBE INSTRUCTIONS AT
> http://jade.cselt.it/mailing.htm#unsubscribe
>
This archive was generated by hypermail 2a22 : Fri Dec 13 2002 - 16:17:56 MET