Class StubDelegateImpl
java.lang.Object
com.sun.corba.ee.impl.javax.rmi.CORBA.StubDelegateImpl
- All Implemented Interfaces:
StubDelegate
Base class from which all static RMI-IIOP stubs must inherit.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Connects this stub to an ORB.boolean
boolean
Compares two stubs for equality.getIOR()
int
hashCode()
int
Returns a hash code value for the object which is the same for all stubs that represent the same remote object.private void
Sets the IOR components if not already set.void
readObject
(Stub self, ObjectInputStream stream) Serialization method to restore the IOR state.void
setIOR
(StubIORImpl ior) Returns a string representation of this stub.void
writeObject
(Stub self, ObjectOutputStream stream) Serialization method to save the IOR state.
-
Field Details
-
wrapper
-
ior
-
-
Constructor Details
-
StubDelegateImpl
public StubDelegateImpl()
-
-
Method Details
-
getIOR
-
setIOR
-
init
Sets the IOR components if not already set. -
hashCode
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 interfaceStubDelegate
- Parameters:
self
- stub to call on- Returns:
- the hash code value.
-
equals
Compares two stubs for equality. Returnstrue
when used to compare stubs that represent the same remote object, andfalse
otherwise.- Specified by:
equals
in interfaceStubDelegate
- Parameters:
self
- stub to call onobj
- the reference object with which to compare.- Returns:
true
if this object is the same as theobj
argument;false
otherwise.
-
equals
-
hashCode
public int hashCode() -
toString
Returns a string representation of this stub. Returns the same string for all stubs that represent the same remote object.- Specified by:
toString
in interfaceStubDelegate
- Parameters:
self
- to call toString on- Returns:
- a string representation of this stub.
-
connect
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 methodPortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote)
.- Specified by:
connect
in interfaceStubDelegate
- Parameters:
self
- stub to call onorb
- 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 interfaceStubDelegate
- Parameters:
self
- stub to readstream
- stream to read from- Throws:
IOException
- if there was an error reading from the streamClassNotFoundException
- if the class that was represented by the steam cannot be found
-
writeObject
Serialization method to save the IOR state.- Specified by:
writeObject
in interfaceStubDelegate
- Parameters:
self
- stub to writestream
- stream to write to- Throws:
IOException
- if there was an error writing to stream
-