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 StubIORImpl
ior
private static UtilSystemException
wrapper
-
Constructor Summary
Constructors Constructor Description StubDelegateImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(Stub self, ORB orb)
Connects this stub to an ORB.boolean
equals(java.lang.Object obj)
boolean
equals(Stub self, java.lang.Object obj)
Compares two stubs for equality.StubIORImpl
getIOR()
int
hashCode()
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.private void
init(Stub self)
Sets the IOR components if not already set.void
readObject(Stub self, java.io.ObjectInputStream stream)
Serialization method to restore the IOR state.void
setIOR(StubIORImpl ior)
java.lang.String
toString(Stub self)
Returns a string representation of this stub.void
writeObject(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:
hashCode
in 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. Returnstrue
when used to compare stubs that represent the same remote object, andfalse
otherwise.- Specified by:
equals
in interfaceStubDelegate
- Parameters:
obj
- the reference object with which to compare.self
- stub to call on- Returns:
true
if this object is the same as theobj
argument;false
otherwise.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
toString
in 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:
connect
in 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:
readObject
in 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:
writeObject
in interfaceStubDelegate
- Parameters:
self
- stub to writestream
- stream to write to- Throws:
java.io.IOException
- if there was an error writing to stream
-
-