javax.rmi.CORBA
public abstract class Stub extends ObjectImpl implements Serializable
UNKNOWN: GNU Classpath uses separate delegate per each Stub. The delegate holds information about the ORB and other data, specific for the each Stub.
Method Summary | |
---|---|
void | connect(ORB orb) Finds the suitable {@link Tie} for this Stub and connects it to the given ORB. |
boolean | equals(Object obj)
The stubs are equal if they point to the same remote object. |
int | hashCode()
Returns the same hashcode for all stubs that point to the same remote
object. |
String | toString()
Get the string representation of this Stub.
|
Finds the suitable {@link Tie} for this Stub and connects it to the given ORB. The tie is found by the name pattern. If the found tie is derived from {@link org.omg.CORBA.PortableServer.Servant}, it is connected to the root POA, also activating it (if not already active).
This method does not allow to specify, to which POA the found Tie must be connected and requires to use the deprecated method {@link ORB#connect}. Many useful POA features remain unaccessible. A better alternative it might be to generate a {@link org.omg.CORBA.PortableServer.Servant} - derived Tie (-poa key in rmic) and connect it to POA in one of the many ways, listed in the description of the {@link orb.omg.PortableServer} package). The obtained CORBA object can be narrowed into stub using {@link PortableRemoteObject#narrow}.
It is frequently easier to call {@link PortableRemoteObject#connect} rather than this method.
Parameters: orb the ORB where the Stub must be connected.
Throws: RemoteException if the stub is already connected to some other ORB. If the stub is already connected to the ORB that was passed as parameter, the method returns without action. BAD_PARAM if the name of this stub does not match the stub name pattern, "_*_Stub" or if the Tie class, "_*Impl_Tie", does not exists or an instance of this class cannot be instantiated.
Returns: the CORBA IOR reference.