Class StubDelegateImpl
- java.lang.Object
-
- com.sun.corba.ee.impl.javax.rmi.CORBA.StubDelegateImpl
-
- All Implemented Interfaces:
StubDelegate
public class StubDelegateImpl extends java.lang.Object implements StubDelegate
Base class from which all static RMI-IIOP stubs must inherit.
-
-
Field Summary
Fields Modifier and Type Field Description private StubIORImpliorprivate static UtilSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description StubDelegateImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(Stub self, ORB orb)Connects this stub to an ORB.booleanequals(java.lang.Object obj)booleanequals(Stub self, java.lang.Object obj)Compares two stubs for equality.StubIORImplgetIOR()inthashCode()inthashCode(Stub self)Returns a hash code value for the object which is the same for all stubs that represent the same remote object.private voidinit(Stub self)Sets the IOR components if not already set.voidreadObject(Stub self, java.io.ObjectInputStream stream)Serialization method to restore the IOR state.voidsetIOR(StubIORImpl ior)java.lang.StringtoString(Stub self)Returns a string representation of this stub.voidwriteObject(Stub self, java.io.ObjectOutputStream stream)Serialization method to save the IOR state.
-
-
-
Field Detail
-
wrapper
private static final UtilSystemException wrapper
-
ior
private StubIORImpl ior
-
-
Method Detail
-
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:
hashCodein interfaceStubDelegate- Parameters:
self- stub to call on- Returns:
- the hash code value.
-
equals
public boolean equals(Stub self, java.lang.Object obj)
Compares two stubs for equality. Returnstruewhen used to compare stubs that represent the same remote object, andfalseotherwise.- Specified by:
equalsin interfaceStubDelegate- Parameters:
obj- the reference object with which to compare.self- stub to call on- Returns:
trueif this object is the same as theobjargument;falseotherwise.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.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:
toStringin interfaceStubDelegate- Parameters:
self- to call toString on- Returns:
- a string representation of this stub.
-
connect
public void connect(Stub self, ORB orb) throws java.rmi.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 methodPortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).- Specified by:
connectin interfaceStubDelegate- Parameters:
orb- the ORB to connect to.self- stub to call on- Throws:
java.rmi.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, java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
Serialization method to restore the IOR state.- Specified by:
readObjectin interfaceStubDelegate- Parameters:
self- stub to readstream- stream to read from- Throws:
java.io.IOException- if there was an error reading from the streamjava.lang.ClassNotFoundException- if the class that was represented by the steam cannot be found
-
writeObject
public void writeObject(Stub self, java.io.ObjectOutputStream stream) throws java.io.IOException
Serialization method to save the IOR state.- Specified by:
writeObjectin interfaceStubDelegate- Parameters:
self- stub to writestream- stream to write to- Throws:
java.io.IOException- if there was an error writing to stream
-
-