FileDocCategorySizeDatePackage
RemoteStub.javaAPI DocphoneME MR2 API (J2ME)2548Wed May 02 18:00:38 BST 2007javax.microedition.jcrmi

RemoteStub

public class RemoteStub extends Object
The RemoteStub class is the common superclass for stubs of remote objects.

Fields Summary
protected RemoteRef
ref
The remote reference associated with this stub object. The stub uses this reference to perform a remote method call.
Constructors Summary
public RemoteStub()
Constructs a RemoteStub.

Methods Summary
public booleanequals(java.lang.Object obj)
Compares two remote objects for equality. Two remote objects are equal if their remote references are non-null and equal.

param
obj the Object to compare with
return
true if these Objects are equal; false otherwise


        if (obj instanceof RemoteStub) {
            if (ref == null) {
                return obj == this;
            } else {
                return ref.remoteEquals(((RemoteStub)obj).ref);
            }
        }
        return false;
    
public inthashCode()
Returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code.

return
remote object hashcode

        return (ref == null) ? super.hashCode() : ref.remoteHashCode();
    
public voidsetRef(RemoteRef ref)
Sets the remote reference associated with this stub object.

param
ref the remote reference


        this.ref = ref;