Class Index | Minimal

Classes


Class jabberwerx.Rendezvous (MINIMAL)


Extends jabberwerx.JWModel.

Type for directing a Rendezvous pattern. The rendezvous pattern allows for execution to continue once a number of jabberwerx.Rendezvousable objects have finished.

This is most notably used in jabberwerx.Client to delay the "clientStatusChanged" event for connected until a number of controllers have finished their startup logic.

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a new rendezvous with the given finished callback.

Method Summary
Method Attributes Method Name and Description
 
finish(rnz)

Finishes the rendezvous for a specific rendezvousable.

 
Determines if this rendezvous has any pending rendezvousables.
 
start(rnz)

Starts the rendezvous for a specific rendezvousable.

Methods borrowed from class jabberwerx.JWModel:
applyEvent, event, shouldBeSavedWithGraph
Methods borrowed from class jabberwerx.JWBase:
destroy, getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString, wasUnserialized, willBeSerialized
Class Detail
jabberwerx.Rendezvous(cb)

Creates a new rendezvous with the given finished callback.

The {cb} function is expected to implement the following signature:

 cb = function(ctx) {
     ctx;        // This Rendezvous object
 }
Parameters:
cb
{Function} The callback to execute when finished.
Throws:
TypeError If {cb} is not a Function
Method Detail
{Boolean} finish(rnz)

Finishes the rendezvous for a specific rendezvousable. This method removes calls jabberwerx.Rendezvousable.startRendezvous on {rnz}, and adds it to the pending list it is starting (returns true}. If there are no pending compoents remaining, the registered callback is executed.

Parameters:
rnz
{jabberwerx.Rendezvousable} The rendezvousable to finish
Returns:
{Boolean} true if {rnz} is finished.

isRunning()
Determines if this rendezvous has any pending rendezvousables.

{Boolean} start(rnz)

Starts the rendezvous for a specific rendezvousable. This method calls jabberwerx.Rendezvousable.startRendezvous on {rnz}, and adds it to the pending list it is starting (returns true}.

NOTE: Mixins cannot be categorically verified as instances (e.g. there is no "instanceof" check on an object for a mixin). Instead, this method checks that {rnz} implements jabberwerx.Rendezvousable.startRendezvous and that the method returns true.

Parameters:
rnz
{jabberwerx.Rendezvousable} The rendezvousable to start
Returns:
{Boolean} true if {rnz} is started.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 02 2014 13:23:42 GMT-0600 (MDT)