net.captp.jcomm
Class NonceLocator

java.lang.Object
  |
  +--net.captp.jcomm.NonceLocator

public class NonceLocator
extends Object

Untamed:


Field Summary
private  CapTPMgr myCapTPMgr
           
private  NearGiftTable myNGifts
           
private  String myOwnID
           
private  PromiseGiftTable myPGifts
           
private  SwissTable mySwissTable
           
 
Constructor Summary
(package private) NonceLocator(PromiseGiftTable pGifts, NearGiftTable nGifts, String ownID, CapTPMgr capTPMgr, SwissTable swissTable)
           
 
Method Summary
 Object acceptFrom(String donorID, BigInteger nonce, BigInteger swissHash, Object optFarVine)
          Enabled:
 Object acceptFrom(String donorID, BigInteger nonce, Object optFarVine)
          Enabled:
 void ignore(Object optFarVine)
          Enabled: Do nothing, letting the argument become garbage.
 Object lookupSwiss(BigInteger swissNum, Object optFarVine)
          Enabled:
 Vine provideFor(Object gift, String recipID, BigInteger nonce)
          Enabled:
 Vine provideFor(Object gift, String recipID, BigInteger nonce, BigInteger swissHash)
          Enabled:
 void traceRemote(String message)
          Enabled: Enables our counterparty to log a message to our tracing system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myPGifts

private final PromiseGiftTable myPGifts

myNGifts

private final NearGiftTable myNGifts

myOwnID

private final String myOwnID

myCapTPMgr

private final CapTPMgr myCapTPMgr

mySwissTable

private final SwissTable mySwissTable
Constructor Detail

NonceLocator

NonceLocator(PromiseGiftTable pGifts,
             NearGiftTable nGifts,
             String ownID,
             CapTPMgr capTPMgr,
             SwissTable swissTable)
Method Detail

provideFor

public Vine provideFor(Object gift,
                       String recipID,
                       BigInteger nonce)
Enabled:


provideFor

public Vine provideFor(Object gift,
                       String recipID,
                       BigInteger nonce,
                       BigInteger swissHash)
Enabled:


acceptFrom

public Object acceptFrom(String donorID,
                         BigInteger nonce,
                         Object optFarVine)
                  throws IOException
Enabled:

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

acceptFrom

public Object acceptFrom(String donorID,
                         BigInteger nonce,
                         BigInteger swissHash,
                         Object optFarVine)
                  throws IOException
Enabled:

Parameters:
donorID - The vatID of the vat (Alice, the gift giver) that provided the gift we're picking up.
nonce - Identifies (together with myOwnID) the gift in the donor's table.
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.
optFarVine - Justs hold onto it until the request is done, to prevent it from being gced.
IOException

ignore

public void ignore(Object optFarVine)
Enabled: 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.


lookupSwiss

public Object lookupSwiss(BigInteger swissNum,
                          Object optFarVine)
Enabled:


traceRemote

public void traceRemote(String message)
Enabled: Enables our counterparty to log a message to our tracing system.

These messages are tagged with the vatID of our counterparty. They are logged at debug level, and currently to the "captp" subsystem. These should probably instead have their own subsystem.



comments?