|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.karmi.rmi.RemoteClientRef
uka.karmi.rmi.SingleRemoteClientRef
Base class for remote client references that only reference a single object on the server side. This is the base class for the DGC. Objects of SingleRemoteClientRef encapsulate the address of one remote object.
The main part of the whole garbage collection process is implemented inside the readExternal and writeExternal methods.
If a stub and its SingleRemoteClientRef is local to the server implementation object, then the local garbage collector is responsible for the local reference from the SingleRemoteClientRef to the server implementation object. Therefore it is important that a SingleRemoteClientRef has a standard Java reference to the controlled server implementation object. This reference is transient. If the SingleRemoteClientRef object is transported in a remote method invocation to a remote address space then the distributed garbage collector becomes responsible for the now remote reference.
Objects of this class are sent over the network by KaRMI.
| Field Summary | |
java.lang.Object |
dgcInfo
Information for the DGC. |
private ObjectId |
dgcObjectId
An identifier of the DGC object this remote reference belongs to. |
private RemoteServerRef |
dgcRef
References a local DGC object. |
(package private) ObjectId |
objectId
Address of the server implementation. |
private RemoteServerRef |
proxyRef
References a local proxy for the remote server. |
RemoteServerRef |
serverRef
Points to the corresponding server reference object of the server implementation, if this reference is local to the server implementation. |
UTID |
useUtid
References the technology that is used to access the remote object. |
| Constructor Summary | |
SingleRemoteClientRef()
Constructor required for implementing the Externalizable interface in subclasses. |
|
SingleRemoteClientRef(ObjectId objectId,
UTID useUtid)
Create a new artificial client reference to a remote server object. |
|
SingleRemoteClientRef(RemoteServerRef serverRef)
Create a new client reference for an exported local server object. |
|
| Method Summary | |
private ObjectId |
createProxy(Technology technology)
Make sure that there is a local proxy for the referenced object. |
boolean |
equals(java.lang.Object obj)
|
void |
finalize()
Finalizes a remote reference object. |
ClientConnection |
getContext(int methodId)
Get the context for a method invocation on the server addressed by this remote reference object. |
int |
hashCode()
|
boolean |
isLocal()
Decides whether this SingleRemoteClientRef points to a local server implementation. |
void |
readExternal(java.io.ObjectInput objectInput)
|
java.lang.String |
toString()
|
java.lang.String |
toStringMembers()
|
void |
writeExternal(java.io.ObjectOutput objectOutput)
Write this client reference to a marshal stream. |
| Methods inherited from class uka.karmi.rmi.RemoteClientRef |
getMarshalInput, getMarshalOutput |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public transient RemoteServerRef serverRef
objectId is used for access.
ObjectId objectId
public transient UTID useUtid
null value indicates that the remote
object is local.
private transient RemoteServerRef proxyRef
private transient RemoteServerRef dgcRef
private ObjectId dgcObjectId
An identifier of the DGC object this remote reference
belongs to. Each remote reference belongs to exactly one DGC. A
null value indicates that this is reference is
artificial or the referenced object is local. An artificial
referenced is created via UnicastRemoteObject.buildStub(String,
String, int) and is not part of a DGC. A local server
implementation has alway a local DGC reference.
public transient java.lang.Object dgcInfo
dgcInfo during unmarshaling
on the other side.
| Constructor Detail |
public SingleRemoteClientRef(RemoteServerRef serverRef)
public SingleRemoteClientRef(ObjectId objectId,
UTID useUtid)
public SingleRemoteClientRef()
Externalizable interface in subclasses.
UnicastRemoteClientRef| Method Detail |
public boolean isLocal()
public int hashCode()
public boolean equals(java.lang.Object obj)
public ClientConnection getContext(int methodId)
throws RemoteException
getContext in class RemoteClientRefRemoteException
public void writeExternal(java.io.ObjectOutput objectOutput)
throws java.io.IOException
Write this client reference to a marshal stream. A client reference is marshaled as a tuple (object identifier, DGC object identifier) with optionally additional DGC information.
When marshaling a client reference, the following cases have to be distinguished.
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput objectInput)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
private final ObjectId createProxy(Technology technology)
throws RemoteException
RemoteException
public void finalize()
throws java.lang.Throwable
dgcObjectId is informed
via the DGC.remoteFinalize(ObjectId, Object) method.
java.lang.Throwablepublic java.lang.String toStringMembers()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||