Known Direct Subclasses
RemoteObjectInvocationHandler |
An implementation of the InvocationHandler interface for
use with Java Remote Method Invocation (Java RMI). |
RemoteServer |
The RemoteServer class is the common superclass to server
implementations and provides the framework to support a wide range
of remote reference semantics. |
RemoteStub |
The RemoteStub class is the common superclass to client
stubs and provides the framework to support a wide range of remote
reference semantics. |
|
Known Indirect Subclasses
Activatable |
The Activatable class provides support for remote
objects that require persistent access over time and that
can be activated by the system. |
ActivationGroup |
An ActivationGroup is responsible for creating new
instances of "activatable" objects in its group, informing its
ActivationMonitor when either: its object's become
active or inactive, or the group as a whole becomes inactive. |
ActivationGroupImpl |
The default activation group implementation. |
ReferenceWrapper |
The ReferenceWrapper class is a Remote wrapper for Reference
objects. |
RegistryImpl |
A "registry" exists on every node that allows RMI connections to
servers on that node. |
SingleEntryRegistry |
A Registry that consists of a single entry that never changes. |
UnicastRemoteObject |
Used for exporting a remote object with JRMP and obtaining a stub
that communicates to the remote object. |
|
Class Overview
The RemoteObject
class implements the
java.lang.Object
behavior for remote objects.
RemoteObject
provides the remote semantics of Object by
implementing methods for hashCode, equals, and toString.
Summary
Fields |
protected
RemoteRef |
ref |
The object's remote reference. |
Protected Constructors |
|
RemoteObject()
Creates a remote object.
|
|
RemoteObject(RemoteRef newref)
Creates a remote object, initialized with the specified remote
reference.
|
Public Methods |
boolean
|
equals(Object obj)
Compares two remote objects for equality.
|
RemoteRef
|
getRef()
Returns the remote reference for the remote object.
|
int
|
hashCode()
Returns a hashcode for a remote object.
|
String
|
toString()
Returns a String that represents the value of this remote object.
|
static
Remote
|
toStub(Remote obj)
Returns the stub for the remote object obj passed
as a parameter.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Fields
The object's remote reference.
Protected Constructors
protected
RemoteObject
()
protected
RemoteObject
(RemoteRef newref)
Creates a remote object, initialized with the specified remote
reference.
Public Methods
public
boolean
equals
(Object obj)
Compares two remote objects for equality.
Returns a boolean that indicates whether this remote object is
equivalent to the specified Object. This method is used when a
remote object is stored in a hashtable.
If the specified Object is not itself an instance of RemoteObject,
then this method delegates by returning the result of invoking the
equals
method of its parameter with this remote object
as the argument.
Parameters
obj
| the Object to compare with |
Returns
- true if these Objects are equal; false otherwise.
Returns the remote reference for the remote object.
Note: The object returned from this method may be an instance of
an implementation-specific class. The RemoteObject
class ensures serialization portability of its instances' remote
references through the behavior of its custom
writeObject
and readObject
methods. An
instance of RemoteRef
should not be serialized outside
of its RemoteObject
wrapper instance or the result may
be unportable.
Returns
- remote reference for the remote object
public
int
hashCode
()
Returns a hashcode for a remote object. Two remote object stubs
that refer to the same remote object will have the same hash code
(in order to support remote objects as keys in hash tables).
Returns
- a hash code value for this object.
public
String
toString
()
Returns a String that represents the value of this remote object.
Returns
- a string representation of the object.
public
static
Remote
toStub
(Remote obj)
Returns the stub for the remote object obj
passed
as a parameter. This operation is only valid after
the object has been exported.
Parameters
obj
| the remote object whose stub is needed |
Returns
- the stub for the remote object,
obj
.