Methods Summary |
---|
public void | connect(javax.rmi.CORBA.Stub self, org.omg.CORBA.ORB orb)Connects this stub to an ORB. Required after the stub is deserialized
but not after it is demarshalled by an ORB stream. If an unconnected
stub is passed to an ORB stream for marshalling, it is implicitly
connected to that ORB. Application code should not call this method
directly, but should call the portable wrapper method
{@link javax.rmi.PortableRemoteObject#connect}.
ior = StubConnectImpl.connect( ior, self, self, orb ) ;
|
public boolean | equals(javax.rmi.CORBA.Stub self, java.lang.Object obj)Compares two stubs for equality. Returns true when used to compare stubs
that represent the same remote object, and false otherwise.
if (self == obj) {
return true;
}
if (!(obj instanceof javax.rmi.CORBA.Stub)) {
return false;
}
// no need to call init() because of calls to hashCode() below
javax.rmi.CORBA.Stub other = (javax.rmi.CORBA.Stub) obj;
if (other.hashCode() != self.hashCode()) {
return false;
}
// hashCodes being the same does not mean equality. The stubs still
// could be pointing to different IORs. So, do a literal comparison.
// Apparently the ONLY way to do this (other than using private
// reflection) toString, because it is not possible to directly
// access the StubDelegateImpl from the Stub.
return self.toString().equals( other.toString() ) ;
|
public boolean | equals(java.lang.Object obj)
if (this == obj)
return true ;
if (!(obj instanceof StubDelegateImpl))
return false ;
StubDelegateImpl other = (StubDelegateImpl)obj ;
if (ior == null)
return ior == other.ior ;
else
return ior.equals( other.ior ) ;
|
public com.sun.corba.se.impl.ior.StubIORImpl | getIOR()
return ior ;
|
public int | hashCode(javax.rmi.CORBA.Stub self)Returns a hash code value for the object which is the same for all stubs
that represent the same remote object.
init(self);
return ior.hashCode() ;
|
private void | init(javax.rmi.CORBA.Stub self)Sets the IOR components if not already set.
// If the Stub is not connected to an ORB, BAD_OPERATION exception
// will be raised by the code below.
if (ior == null)
ior = new StubIORImpl( self ) ;
|
public void | readObject(javax.rmi.CORBA.Stub self, java.io.ObjectInputStream stream)Serialization method to restore the IOR state.
if (ior == null)
ior = new StubIORImpl() ;
ior.doRead( stream ) ;
|
public java.lang.String | toString(javax.rmi.CORBA.Stub self)Returns a string representation of this stub. Returns the same string
for all stubs that represent the same remote object.
if (ior == null)
return null ;
else
return ior.toString() ;
|
public void | writeObject(javax.rmi.CORBA.Stub self, java.io.ObjectOutputStream stream)Serialization method to save the IOR state.
init(self);
ior.doWrite( stream ) ;
|