org.erights.e.elib.ref
Interface ProxyHandler

All Known Implementing Classes:
BootRefHandler, RemoteHandler

public interface ProxyHandler

Untamed:


Method Summary
 SealedBox handleOptSealedDispatch(Brand brand)
          Enabled: 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)
          Enabled: My Ref is asking me to deliver the message to the other side, and return a promise for the result.
 void handleSendAllOnly(String verb, Object[] args)
          Enabled: My Ref is asking me to deliver the message to the other side and ignore the result.
 boolean isFresh()
          Enabled: A reference is fresh if it's redirection doesn't need to be delayed.
 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?
 

Method Detail

handleOptSealedDispatch

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


handleSendAllOnly

public void handleSendAllOnly(String verb,
                              Object[] args)
Enabled: My Ref is asking me to deliver the message to the other side and ignore the result.

If the underlying transport mechanism is shut down or otherwise not accepting messages, then it should throw a problem explaining why this message wasn't queued.


handleSendAll

public Ref handleSendAll(String verb,
                         Object[] args)
Enabled: My Ref is asking me to deliver the message to the other side, and return a promise for the result.

If the underlying transport mechanism is shut down or otherwise not accepting messages, then it should either throw a problem explaining why this message wasn't queued, or return a reference that's immediately broken by this problem.


handleResolution

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


reactToGC

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


isFresh

public boolean isFresh()
Enabled: A reference is fresh if it's redirection doesn't need to be delayed.

A resolved reference doesn't get redirected (except to be smashed), and so is always fresh. A remote promise is fresh if it hasn't been used. A remote promise over which messages have already been sent is not fresh. (Hypothetically, if we know that none of these remain in the air -- that all of them have arrived -- then we could consider the remote promise to be fresh again. This optimization is not currently implemented.)


sameConnection

public 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?



comments?