Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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 Summary
 UID()
Create a pure identifier that is unique with respect to the host on which it is generated.
 UID(short num)
Create a "well-known" ID.
 

Method Summary
boolean  equals(Object obj)
 
int  hashCode()
 
static UID  read(DataInput in)
Get the uid from the input stream.
String  toString()
 
void  write(DataOutput out)
Write uid to output stream.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

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.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

write

public void write(DataOutput out) throws IOException
Write uid to output stream.

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)

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.