ObjID is used to identify a remote object exported
to an RMI runtime. When a remote object is exported, it is assigned
an object identifier either implicitly or explicitly, depending on
the API used to export.
The ObjID() constructor can be used to generate a unique
object identifier. Such an ObjID is unique over time
with respect to the host it is generated on.
The ObjID(int) constructor can be used to create a
"well-known" object identifier. The scope of a well-known
ObjID depends on the RMI runtime it is exported to.
An ObjID instance contains an object number (of type
long) and an address space identifier (of type
UID). In a unique ObjID, the address space
identifier is unique with respect to a given host over time. In a
well-known ObjID, the address space identifier is
equivalent to one returned by invoking the UID#UID(short)
constructor with the value zero.
If the system property java.rmi.server.randomIDs
is defined to equal the string "true" (case insensitive),
then the ObjID() constructor will use a cryptographically
strong random number generator to choose the object number of the
returned ObjID.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACTIVATOR_ID
Object number for well-known |
| public static final int | DGC_ID
Object number for well-known |
| private static final UID | |
| private static final AtomicLong | |
| private final long | |
| public static final int | REGISTRY_ID
Object number for well-known |
| private static final SecureRandom | |
| private static final long | serialVersionUID
indicate compatibility with JDK 1.1.x version of class |
| private final UID |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ObjID(int
object number for well-known object identifier objNum)Creates a "well-known" object identifier. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the given object is equivalent to
this one, and false otherwisethe object to compare this obj)ObjID toOverrides java. Compares the specified object with this |
| public int | Returns: the hash code value for this object identifierOverrides java. Returns the hash code value for this object identifier, the object number. |
| public static ObjID | Returns: unmarshalledObjID instancethe in)ObjectInput instance to read
ObjID fromConstructs and returns a new |
| public String | Returns: a string representation of this object identifierOverrides java. Returns a string representation of this object identifier. |
| private static boolean | |
| public void | write(ObjectOutput
the out)ObjectOutput instance to write
this ObjID toMarshals a binary representation of this |
| ACTIVATOR_ID | back to summary |
|---|---|
| public static final int ACTIVATOR_ID Object number for well-known | |
| DGC_ID | back to summary |
|---|---|
| public static final int DGC_ID Object number for well-known | |
| mySpace | back to summary |
|---|---|
| private static final UID mySpace | |
| nextObjNum | back to summary |
|---|---|
| private static final AtomicLong nextObjNum | |
| objNum | back to summary |
|---|---|
private final long objNum
| |
| REGISTRY_ID | back to summary |
|---|---|
| public static final int REGISTRY_ID Object number for well-known | |
| secureRandom | back to summary |
|---|---|
| private static final SecureRandom secureRandom | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID indicate compatibility with JDK 1.1.x version of class | |
| space | back to summary |
|---|---|
| private final UID space | |
| ObjID | back to summary |
|---|---|
| public ObjID() Generates a unique object identifier. If the system property | |
| ObjID | back to summary |
|---|---|
| public ObjID(int objNum) Creates a "well-known" object identifier. An
| |
| ObjID | back to summary |
|---|---|
| private ObjID(long objNum, UID space) Constructs an object identifier given data read from a stream. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares the specified object with this
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this object identifier, the object number.
| |
| read | back to summary |
|---|---|
| public static ObjID read(ObjectInput in) throws IOException Constructs and returns a new Specifically, this method first invokes the given stream's
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this object identifier.
| |
| useRandomIDs | back to summary |
|---|---|
| private static boolean useRandomIDs() | |
| write | back to summary |
|---|---|
| public void write(ObjectOutput out) throws IOException Marshals a binary representation of this Specifically, this method first invokes the given stream's
| |