javax.rmi.CORBA
Interface StubDelegate

All Known Implementing Classes:
StubDelegate

public interface StubDelegate

The implementation delegate class for javax.rmi.CORBA.Stub must implement the following interface for per-instance delegation.


Method Summary
 void connect(Stub self, ORB orb)
          This method makes the stub ready for remote communication using the specified ORB object.
 boolean equals(Stub self, Object obj)
          The equals method shall return true when used to compare stubs that represent the same remote object.
 int hashCode(Stub self)
          This method shall return the same hashcode for all stubs that represent the same remote object.
 void readObject(Stub self, ObjectInputStream s)
          This method supports stub deserialization by restoring the IOR associated with the stub.
 String toString(Stub self)
          Returns a string representing the target object.
 void writeObject(Stub self, ObjectOutputStream s)
          This method supports stub serialization by saving the IOR associated with the stub.
 

Method Detail

hashCode

public int hashCode(Stub self)
This method shall return the same hashcode for all stubs that represent the same remote object.
Parameters:
self - the actual stub.
Returns:
a hashcode for the target object.

equals

public boolean equals(Stub self,
                      Object obj)
The equals method shall return true when used to compare stubs that represent the same remote object.
Parameters:
self - the actual stub.
obj - an object to compare the target with.
Returns:
true if the target and obj represent the same object, false otherwise.

toString

public String toString(Stub self)
Returns a string representing the target object. This method shall return the same string for all stubs that represent the same remote object.
Parameters:
self - the actual stub.
Returns:
a string representing the target object.

connect

public void connect(Stub self,
                    ORB orb)
             throws RemoteException
This method makes the stub ready for remote communication using the specified ORB object.
Parameters:
self - the actual stub.
orb - an ORB;
Throws:
RemoteException - if something goes wrong.

writeObject

public void writeObject(Stub self,
                        ObjectOutputStream s)
                 throws IOException
This method supports stub serialization by saving the IOR associated with the stub.
Parameters:
self - the actual stub.
s - an ObjectOutputStream;
Throws:
IOException - if an IO error occurs.

readObject

public void readObject(Stub self,
                       ObjectInputStream s)
                throws IOException,
                       ClassNotFoundException
This method supports stub deserialization by restoring the IOR associated with the stub.
Parameters:
self - the actual stub.
s - an ObjectInputStream;
Throws:
IOException - if an IO error occurs;
ClassNotFoundException - if a class can't be found.