48 * The {@link #ObjID(int)} constructor can be used to create a
49 * "well-known" object identifier. The scope of a well-known
50 * <code>ObjID</code> depends on the RMI runtime it is exported to.
51 *
52 * <p>An <code>ObjID</code> instance contains an object number (of type
53 * <code>long</code>) and an address space identifier (of type
54 * {@link UID}). In a unique <code>ObjID</code>, the address space
55 * identifier is unique with respect to a given host over time. In a
56 * well-known <code>ObjID</code>, the address space identifier is
57 * equivalent to one returned by invoking the {@link UID#UID(short)}
58 * constructor with the value zero.
59 *
60 * <p>If the system property <code>java.rmi.server.randomIDs</code>
61 * is defined to equal the string <code>"true"</code> (case insensitive),
62 * then the {@link #ObjID()} constructor will use a cryptographically
63 * strong random number generator to choose the object number of the
64 * returned <code>ObjID</code>.
65 *
66 * @author Ann Wollrath
67 * @author Peter Jones
68 * @since JDK1.1
69 */
70 public final class ObjID implements Serializable {
71
72 /** Object number for well-known <code>ObjID</code> of the registry. */
73 public static final int REGISTRY_ID = 0;
74
75 /** Object number for well-known <code>ObjID</code> of the activator. */
76 public static final int ACTIVATOR_ID = 1;
77
78 /**
79 * Object number for well-known <code>ObjID</code> of
80 * the distributed garbage collector.
81 */
82 public static final int DGC_ID = 2;
83
84 /** indicate compatibility with JDK 1.1.x version of class */
85 private static final long serialVersionUID = -6386392263968365220L;
86
87 private static final AtomicLong nextObjNum = new AtomicLong(0);
88 private static final UID mySpace = new UID();
|
48 * The {@link #ObjID(int)} constructor can be used to create a
49 * "well-known" object identifier. The scope of a well-known
50 * <code>ObjID</code> depends on the RMI runtime it is exported to.
51 *
52 * <p>An <code>ObjID</code> instance contains an object number (of type
53 * <code>long</code>) and an address space identifier (of type
54 * {@link UID}). In a unique <code>ObjID</code>, the address space
55 * identifier is unique with respect to a given host over time. In a
56 * well-known <code>ObjID</code>, the address space identifier is
57 * equivalent to one returned by invoking the {@link UID#UID(short)}
58 * constructor with the value zero.
59 *
60 * <p>If the system property <code>java.rmi.server.randomIDs</code>
61 * is defined to equal the string <code>"true"</code> (case insensitive),
62 * then the {@link #ObjID()} constructor will use a cryptographically
63 * strong random number generator to choose the object number of the
64 * returned <code>ObjID</code>.
65 *
66 * @author Ann Wollrath
67 * @author Peter Jones
68 * @since 1.1
69 */
70 public final class ObjID implements Serializable {
71
72 /** Object number for well-known <code>ObjID</code> of the registry. */
73 public static final int REGISTRY_ID = 0;
74
75 /** Object number for well-known <code>ObjID</code> of the activator. */
76 public static final int ACTIVATOR_ID = 1;
77
78 /**
79 * Object number for well-known <code>ObjID</code> of
80 * the distributed garbage collector.
81 */
82 public static final int DGC_ID = 2;
83
84 /** indicate compatibility with JDK 1.1.x version of class */
85 private static final long serialVersionUID = -6386392263968365220L;
86
87 private static final AtomicLong nextObjNum = new AtomicLong(0);
88 private static final UID mySpace = new UID();
|