net.captp.jcomm
Class LookupHandler

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

class LookupHandler
extends RemoteHandler

A handler for the special remote reference at position zero to the other side's NonceLocator

Author:
Mark S. Miller

Field Summary
(package private)  CapTPConnection myConn
          Connection to the vat I point into
(package private)  ProxyResolver myResolver
          The Resolver of our Proxy, which also revives the Proxy on demand.
 
Constructor Summary
(package private) LookupHandler(CapTPConnection conn)
          Construct a new LookupHandler.
 
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)
          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()
          Shouldn't get redirected, so always fresh.
 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

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

LookupHandler

LookupHandler(CapTPConnection conn)
Construct a new LookupHandler.

Method Detail

isFresh

public boolean isFresh()
Shouldn't get redirected, so always fresh.

XXX kludge: even though this is made to appear as an unresolved remote reference, ie, a remote promise.


handleOptSealedDispatch

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

Specified by:
handleOptSealedDispatch in interface ProxyHandler

handleSendAllOnly

public void handleSendAllOnly(String verb,
                              Object[] args)
Description copied from interface: ProxyHandler
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.

Specified by:
handleSendAllOnly in interface ProxyHandler

handleSendAll

public Ref handleSendAll(String verb,
                         Object[] args)
Description copied from interface: ProxyHandler
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.

Specified by:
handleSendAll 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?