net.captp.jcomm
Class RemotePromiseHandler

java.lang.Object
  |
  +--net.captp.jcomm.RemoteHandler
        |
        +--net.captp.jcomm.RemotePromiseHandler
All Implemented Interfaces:
ProxyHandler

class RemotePromiseHandler
extends RemoteHandler

Handles an unresolved remote reference (a RemotePromise).

Author:
Mark S. Miller

Field Summary
(package private)  CapTPConnection myConn
          Connection to the vat I point into
private  boolean myFreshFlag
          Flag to remember whether any E-level messages have been sent over me.
(package private)  ProxyResolver myResolver
          The Resolver of our Proxy, which also revives the Proxy on demand.
 
Constructor Summary
(package private) RemotePromiseHandler(CapTPConnection connection, int pos)
          Construct a new RemotePromiseHandler.
 
Method Summary
(package private)  void countWireRef()
           
(package private)  int getPos()
           
 SealedBox handleOptSealedDispatch(Brand brand)
          How should my ref respond to an __optSealedDispatch request?
 void handleResolution(Object newTarget)
          Enabled: My Ref no longer needs me, as it's become equivalent to newTarget.
 Ref handleSendAll(String verb, Object[] args)
          Override to also clear myFreshFlag
 void handleSendAllOnly(String verb, Object[] args)
          Override to also clear myFreshFlag
 boolean isFresh()
          Have no E-level messages yet been sent over me?
 void reactToGC()
          Enabled: One of my Refs was GCed, and I have no current Ref.
 boolean sameConnection(Object other)
          Enabled: Are 'other' and the remote reference handled by 'this' part of the same comm system, and do they both connect to the same remote vat?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myFreshFlag

private boolean myFreshFlag
Flag to remember whether any E-level messages have been sent over me.


myConn

final CapTPConnection myConn
Connection to the vat I point into


myResolver

final ProxyResolver myResolver
The Resolver of our Proxy, which also revives the Proxy on demand.

Constructor Detail

RemotePromiseHandler

RemotePromiseHandler(CapTPConnection connection,
                     int pos)
Construct a new RemotePromiseHandler.

Parameters:
connection - The CapTPConnection to communicate via
pos - The Imports or Questions map pos of the object
Method Detail

handleSendAllOnly

public void handleSendAllOnly(String verb,
                              Object[] args)
Override to also clear myFreshFlag

Specified by:
handleSendAllOnly in interface ProxyHandler
Overrides:
handleSendAllOnly in class RemoteHandler

handleSendAll

public Ref handleSendAll(String verb,
                         Object[] args)
Override to also clear myFreshFlag

Specified by:
handleSendAll in interface ProxyHandler
Overrides:
handleSendAll in class RemoteHandler

isFresh

public boolean isFresh()
Have no E-level messages yet been sent over me?


handleOptSealedDispatch

public SealedBox handleOptSealedDispatch(Brand brand)
How should my ref respond to an __optSealedDispatch request?

Specified by:
handleOptSealedDispatch in interface ProxyHandler

handleResolution

public void handleResolution(Object newTarget)
Description copied from interface: ProxyHandler
Enabled: My Ref no longer needs me, as it's become equivalent to newTarget.

Specified by:
handleResolution in interface ProxyHandler

reactToGC

public void reactToGC()
Description copied from interface: ProxyHandler
Enabled: One of my Refs was GCed, and I have no current Ref.

Specified by:
reactToGC in interface ProxyHandler

getPos

int getPos()

countWireRef

void countWireRef()

sameConnection

public boolean sameConnection(Object other)
Description copied from interface: ProxyHandler
Enabled: Are 'other' and the remote reference handled by 'this' part of the same comm system, and do they both connect to the same remote vat?

Specified by:
sameConnection in interface ProxyHandler


comments?