All Packages Class Hierarchy This Package Previous Next Index

Class java.rmi.server.UID

java.lang.Object | +----java.rmi.server.UID
public final class UID
extends Object
implements Serializable
Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.


Constructor Index

 o UID()
Create a pure identifier that is unique with respect to the host on which it is generated.
 o UID(short)
Create a "well-known" ID.

Method Index

 o equals(Object)
Compares two Objects for equality.
 o hashCode()
Returns a hash code value for the object.
 o read(DataInput)
Get the uid from the input stream.
 o toString()
Returns a string representation of the object.
 o write(DataOutput)
Write uid to output stream.

Constructors

 o UID public UID()
Create a pure identifier that is unique with respect to the host on which it is generated. This UID is unique under the following conditions: a) the machine takes more than one second to reboot, and b) the machine's clock is never set backward. In order to construct a UID that is globally unique, simply pair a UID with an InetAddress.

 o UID public UID(short num)
Create a "well-known" ID. There are 2^16 -1 such possible well-known ids. An id generated via this constructor will not clash with any id generated via the default UID constructor which will generates a genuinely unique identifier with respect to this host.

Methods

 o hashCode public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
 o equals public boolean equals(Object obj)
Compares two Objects for equality.

Overrides:
equals in class Object
 o toString public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
 o write public void write(DataOutput out) throws IOException
Write uid to output stream.

 o read public static UID read(DataInput in) throws IOException
Get the uid from the input stream.

Parameters:
in - the input stream
Throws: IOException
If uid could not be read (due to stream failure or malformed uid)

All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature