User Tools

Site Tools


at:tutorial:distribution

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
at:tutorial:distribution [2009/01/29 15:21] elisagat:tutorial:distribution [2009/01/29 15:21] elisag
Line 257: Line 257:
 Additionally, AmbientTalk provides dedicated takenOffline observers which get triggered only once when the object is taken offline. They are installed similarly to when:disconnected observers as follows: Additionally, AmbientTalk provides dedicated takenOffline observers which get triggered only once when the object is taken offline. They are installed similarly to when:disconnected observers as follows:
  
 +<code>
 when: messenger takenOffline: { when: messenger takenOffline: {
   system.println("Buddy offline: " + name);   system.println("Buddy offline: " + name);
   //clean certain resources associated to the buddy   //clean certain resources associated to the buddy
 }; };
 +</code>
  
 The construct takes as parameter a far reference and a block of code that is executed when the taken offline event is notified to the virtual machine. ''when:takenOffline'' can be considered as a special kind of ''when:disconnected'' observers which are triggered only in case of "logical" disconnection, but not in cases of network disconnections. The construct takes as parameter a far reference and a block of code that is executed when the taken offline event is notified to the virtual machine. ''when:takenOffline'' can be considered as a special kind of ''when:disconnected'' observers which are triggered only in case of "logical" disconnection, but not in cases of network disconnections.
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem