|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.karmi.rmi.server.RemoteObject
RemoteObject is the base class for remotely accessible objects. The
only remote object implementation currently supported is the
UnicastRemoteObject.
UnicastRemoteObject| Field Summary | |
RemoteServerRef |
serverRef
A reference to the remote server that is responsible for this object. |
| Constructor Summary | |
protected |
RemoteObject()
|
| Method Summary | |
static RemoteStub |
buildStub(java.lang.String stubName,
SingleRemoteClientRef clientRef)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
getOwner()
Return the root object this object belongs to. |
int |
hashCode()
Here we have an incompatible situation with Sun's RMI. |
java.lang.String |
toString()
|
java.lang.String |
toStringMembers()
|
static Remote |
toStub(Remote obj)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public transient RemoteServerRef serverRef
| Constructor Detail |
protected RemoteObject()
| Method Detail |
public int hashCode()
If stubs are compared or hashCode is called on a stub, the corresponding RemoteClientRefs decide if the stubs are considered equal and calc the hash code.
Two stubs should be considered equal, if they reference the same remote object. This is the same behavior that is implemented in Sun's RMI. If the remote object does only implement the remote interface and is not subclass of RemoteObject, it depends on the implementation of equals() and hashCode(), how equality is treated.
If the remote object is subclass of RemoteObject, and it is exported, the remote serverRef is responsible for hash code and equality. The serverRef should implement the behavior, that the remote object and its stubs are all equal and return the same hashCode.
=> If a RemoteObject is exported with a UnicastServerReference, it always gains this behavior because the serverRef provides it.
In Sun's RMI you can export your RemoteObject as UnicastRemoteObject but it does not gain this behaviour unless the object is a subclass of UnicastRemoteObject.
In KaRMI the following simple rule is implemented:
The RemoteServerRef is responsible for the implementation of equals() and hashCode() if the remote object extends RemoteObject. It doesn't matter how it was exported!!!
public boolean equals(java.lang.Object obj)
public final java.lang.Object getOwner()
PatchableRootPatchableRoot, if the PatchableRoot.getOwner() method returns
another object than the current replicated object.
getOwner in interface PatchableRootPatchableRoot.getOwner()public java.lang.String toStringMembers()
public java.lang.String toString()
public static Remote toStub(Remote obj)
throws NoSuchObjectException
NoSuchObjectException
public static RemoteStub buildStub(java.lang.String stubName,
SingleRemoteClientRef clientRef)
throws RemoteException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||