Class StubDelegateImpl

java.lang.Object
com.sun.corba.ee.impl.javax.rmi.CORBA.StubDelegateImpl
All Implemented Interfaces:
StubDelegate

public class StubDelegateImpl extends Object implements StubDelegate
Base class from which all static RMI-IIOP stubs must inherit.
  • Field Details

  • Constructor Details

    • StubDelegateImpl

      public StubDelegateImpl()
  • Method Details

    • getIOR

      public StubIORImpl getIOR()
    • setIOR

      public void setIOR(StubIORImpl ior)
    • init

      private void init(Stub self)
      Sets the IOR components if not already set.
    • hashCode

      public int hashCode(Stub self)
      Returns a hash code value for the object which is the same for all stubs that represent the same remote object.
      Specified by:
      hashCode in interface StubDelegate
      Parameters:
      self - stub to call on
      Returns:
      the hash code value.
    • equals

      public boolean equals(Stub self, Object obj)
      Compares two stubs for equality. Returns true when used to compare stubs that represent the same remote object, and false otherwise.
      Specified by:
      equals in interface StubDelegate
      Parameters:
      self - stub to call on
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString(Stub self)
      Returns a string representation of this stub. Returns the same string for all stubs that represent the same remote object.
      Specified by:
      toString in interface StubDelegate
      Parameters:
      self - to call toString on
      Returns:
      a string representation of this stub.
    • connect

      public void connect(Stub self, ORB orb) throws RemoteException
      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 PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
      Specified by:
      connect in interface StubDelegate
      Parameters:
      self - stub to call on
      orb - the ORB to connect to.
      Throws:
      RemoteException - if the stub is already connected to a different ORB, or if the stub does not represent an exported remote or local object.
    • readObject

      public void readObject(Stub self, ObjectInputStream stream) throws IOException, ClassNotFoundException
      Serialization method to restore the IOR state.
      Specified by:
      readObject in interface StubDelegate
      Parameters:
      self - stub to read
      stream - stream to read from
      Throws:
      IOException - if there was an error reading from the stream
      ClassNotFoundException - if the class that was represented by the steam cannot be found
    • writeObject

      public void writeObject(Stub self, ObjectOutputStream stream) throws IOException
      Serialization method to save the IOR state.
      Specified by:
      writeObject in interface StubDelegate
      Parameters:
      self - stub to write
      stream - stream to write to
      Throws:
      IOException - if there was an error writing to stream