|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.karmi.rmi.server.RemoteServerRef
uka.karmi.rmi.ProxyServerRef
A proxy for a remote object. A proxy holds a SingleRemoteClientRef and prevents this reference from being garbage collected. If a server is addressable in technology A and a client in technology B wants to access this server, a proxy on a JVM with both technologies must be used. The technology B client gets a reference to the proxy. The proxy receives the call and forwards it to the server. Sometimes a proxy is only necessary for the DGC. This is the case when a remote reference from DGC technology A is needed in technology B. Then a proxy is required even if the server object can be address via technology A and technology B.
| Field Summary | |
private SingleRemoteClientRef |
clientRef
The proxy keeps a reference to this remote reference to prevent it from being garbage collected. |
private RemoteSkeleton |
skel
A skeleton that is stacked on a stub instead of a server implementation. |
private RemoteStub |
stub
|
| Fields inherited from class uka.karmi.rmi.server.RemoteServerRef |
callCounter, ep, objectId, objectId2 |
| Constructor Summary | |
ProxyServerRef(SingleRemoteClientRef clientRef)
Create an unexported server reference to a proxy for the given client reference. |
|
| Method Summary | |
void |
doApplicationCall(ServerConnection c)
The entry-point into the method dispatch process. |
RemoteStub |
getStub()
Returns null. |
boolean |
remoteEquals(RemoteStub obj)
ProxyServerRef objects are never visible in the Stub/Skeleton layer. |
void |
synchronize(RMACallback cb)
|
java.lang.String |
toStringMembers()
|
void |
unreferenced()
Called whenever the last remote reference to this server implementation is garbage collected. |
| Methods inherited from class uka.karmi.rmi.server.RemoteServerRef |
createSkeletonFor, createStubFor, decCallCounter, getClientHost, incCallCounter, newInstanceRelative, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private SingleRemoteClientRef clientRef
private RemoteStub stub
skelprivate RemoteSkeleton skel
clientRef. This skeleton is
initialized lazily, because it is only required, if this proxy
is actually used for communication.
stub| Constructor Detail |
public ProxyServerRef(SingleRemoteClientRef clientRef)
throws RemoteException
| Method Detail |
public void doApplicationCall(ServerConnection c)
throws java.io.IOException,
java.lang.ClassNotFoundException
RemoteServerRefdispatch() method of the server
connection. The actual dispatch is done in a sub-class of
RemoteServerRef. This abstract method is
implemented for unicast servers in the
UnicastRemoteServerRef class.
doApplicationCall in class RemoteServerRefc - the connection, the call came in
java.io.IOException
java.lang.ClassNotFoundExceptionServerConnection.dispatch(boolean),
UnicastRemoteServerRef.doApplicationCall(ServerConnection)public void unreferenced()
RemoteServerRef
unreferenced in class RemoteServerRefUnreferencedpublic RemoteStub getStub()
getStub in class RemoteServerRef
public void synchronize(RMACallback cb)
throws java.lang.Throwable
synchronize in class RemoteServerRefjava.lang.Throwablepublic boolean remoteEquals(RemoteStub obj)
remoteEquals in class RemoteServerRefpublic java.lang.String toStringMembers()
toStringMembers in class RemoteServerRef
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||