src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/StubDelegateImpl.java

Print this page




 130         // access the StubDelegateImpl from the Stub.
 131         return self.toString().equals( other.toString() ) ;
 132     }
 133 
 134     public boolean equals( Object obj )
 135     {
 136         if (this == obj)
 137             return true ;
 138 
 139         if (!(obj instanceof StubDelegateImpl))
 140             return false ;
 141 
 142         StubDelegateImpl other = (StubDelegateImpl)obj ;
 143 
 144         if (ior == null)
 145             return ior == other.ior ;
 146         else
 147             return ior.equals( other.ior ) ;
 148     }
 149 








 150     /**
 151      * Returns a string representation of this stub. Returns the same string
 152      * for all stubs that represent the same remote object.
 153      * @return a string representation of this stub.
 154      */
 155     public String toString(javax.rmi.CORBA.Stub self)
 156     {
 157         if (ior == null)
 158             return null ;
 159         else
 160             return ior.toString() ;
 161     }
 162 
 163     /**
 164      * Connects this stub to an ORB. Required after the stub is deserialized
 165      * but not after it is demarshalled by an ORB stream. If an unconnected
 166      * stub is passed to an ORB stream for marshalling, it is implicitly
 167      * connected to that ORB. Application code should not call this method
 168      * directly, but should call the portable wrapper method
 169      * {@link javax.rmi.PortableRemoteObject#connect}.




 130         // access the StubDelegateImpl from the Stub.
 131         return self.toString().equals( other.toString() ) ;
 132     }
 133 
 134     public boolean equals( Object obj )
 135     {
 136         if (this == obj)
 137             return true ;
 138 
 139         if (!(obj instanceof StubDelegateImpl))
 140             return false ;
 141 
 142         StubDelegateImpl other = (StubDelegateImpl)obj ;
 143 
 144         if (ior == null)
 145             return ior == other.ior ;
 146         else
 147             return ior.equals( other.ior ) ;
 148     }
 149 
 150     public int hashCode() {
 151         if (ior == null) {
 152             return 0;
 153         } else {
 154             return ior.hashCode();
 155         }
 156     }
 157 
 158     /**
 159      * Returns a string representation of this stub. Returns the same string
 160      * for all stubs that represent the same remote object.
 161      * @return a string representation of this stub.
 162      */
 163     public String toString(javax.rmi.CORBA.Stub self)
 164     {
 165         if (ior == null)
 166             return null ;
 167         else
 168             return ior.toString() ;
 169     }
 170 
 171     /**
 172      * Connects this stub to an ORB. Required after the stub is deserialized
 173      * but not after it is demarshalled by an ORB stream. If an unconnected
 174      * stub is passed to an ORB stream for marshalling, it is implicitly
 175      * connected to that ORB. Application code should not call this method
 176      * directly, but should call the portable wrapper method
 177      * {@link javax.rmi.PortableRemoteObject#connect}.