NonceLocator

From Erights

Jump to: navigation, search

There is one NonceLocator per side of a CapTP connection; each participant automatically exports its NonceLocator at IncomingPos 0. The NonceLocator bootstraps communication with other objects in its host vat, by providing them when given a swiss number or the details of a 3-party introduction. XXX review for accuracy

Contents

Protocol

provideFor/3

Signature: provideFor(gift, recip, nonce) :Vine

The specification for this message has not been written.

provideFor/4

Signature: provideFor(gift, recip, nonce, swissHash) :Vine

The specification for this message has not been written.

acceptFrom/4

Signature: acceptFrom(donorPath, donorID, nonce, optFarVine) :any

The specification for this message has not been written.

   /**
    * @param donorID    The vatID of the vat (Alice, the gift giver) that
    *                   provided the gift we're picking up.
    * @param nonce      Identifies (together with myOwnID) the gift in the
    *                   donor's table.
    * @param optFarVine Justs hold onto it until the request is done, to
    *                   prevent it from being gced.
    */

acceptFrom/4

Signature: acceptFrom(donorPath, donorID, nonce, swissHash, optFarVine) :any

The specification for this message has not been written.

   /**
    * @param donorID    The vatID of the vat (Alice, the gift giver) that
    *                   provided the gift we're picking up.
    * @param nonce      Identifies (together with myOwnID) the gift in the
    *                   donor's table.
    * @param swissHash  The gift should only be returned if it has this
    *                   identity. Otherwise the recipient should get a
    *                   DisconnectedRef. This isn't yet fully implemented.
    * @param optFarVine Justs hold onto it until the request is done, to
    *                   prevent it from being gced.
    */

ignore/1

Signature: ignore(_) :void

Do nothing, letting the argument become garbage.

The purpose of the message is to ensure that the argument isn't garbage until the message is delivered. XXX For rationale, document what conditions this is used under.

lookupSwiss/1

Signature: lookupSwiss(swissNum :Swiss, optFarVine :any) :any

Returns the object designated by the given Swiss number in this vat.

(In current CapTP implementations, this is implemented by forwarding to this CapTP instance's SwissTable#lookupSwiss/1.)

NOTE: In the E-on-Java implementation of SwissTable, null always has the swiss number 0. This is an implementation convenience and CapTP implementations must not assume anything about the swiss numbers exported by other vats. (2009-08-21: E-on-CL and Caja-CapTP both need to be reviewed for unnecessarily conforming to this scheme.) XXX SwissTable is an implementation detail; this note is about the exposed behavior of CapTP.

Personal tools
more tools