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 TypeMethodDescriptionvoidConnects this stub to an ORB.booleanbooleanCompares two stubs for equality.getIOR()inthashCode()intReturns a hash code value for the object which is the same for all stubs that represent the same remote object.private voidSets the IOR components if not already set.voidreadObject(Stub self, ObjectInputStream stream) Serialization method to restore the IOR state.voidsetIOR(StubIORImpl ior) Returns a string representation of this stub.voidwriteObject(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:
hashCodein interfaceStubDelegate- Parameters:
self- stub to call on- Returns:
- the hash code value.
-
equals
Compares two stubs for equality. Returnstruewhen used to compare stubs that represent the same remote object, andfalseotherwise.- Specified by:
equalsin interfaceStubDelegate- Parameters:
self- stub to call onobj- the reference object with which to compare.- Returns:
trueif this object is the same as theobjargument;falseotherwise.
-
equals
-
hashCode
-
toString
Returns a string representation of this stub. Returns the same string for all stubs that represent the same remote object.- Specified by:
toStringin 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(Remote, Remote).- Specified by:
connectin 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:
readObjectin 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:
writeObjectin interfaceStubDelegate- Parameters:
self- stub to writestream- stream to write to- Throws:
IOException- if there was an error writing to stream
-