org.sapia.ubik.rmi.server
Class OID

java.lang.Object
  extended by org.sapia.ubik.rmi.server.OID
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Comparable

public class OID
extends java.lang.Object
implements java.io.Externalizable, java.lang.Comparable

This class models a unique remote object identifier. An instance of this class uniquely identifies a remote object, even among multiple VMs.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
Serialized Form

Constructor Summary
OID()
          Do not call; used for externalization only.
OID(long id)
          Creates an instance of this class with the given identifier string.
 
Method Summary
 int compareTo(java.lang.Object other)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getCodebase()
           
 int hashCode()
          Creates a hashcode with this instance's internal ID string.
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OID

public OID()
Do not call; used for externalization only.


OID

public OID(long id)
Creates an instance of this class with the given identifier string.

Method Detail

hashCode

public int hashCode()
Creates a hashcode with this instance's internal ID string.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
Returns:
true if the object passed in is another object identifier representing the same remote reference has this.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable.readExternal(ObjectInput)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
See Also:
Externalizable.writeExternal(ObjectOutput)

getCodebase

public java.lang.String getCodebase()
Returns:
the remote codebase of the object to which this instance corresponds, or null if no such codebase has been set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2010 Sapia OSS. All Rights Reserved.