public abstract class Stub extends ObjectImpl implements Serializable
StubDelegate
. Hence Stub contains two delegates, one for
Stub-related operations and another inherited from the ObjectImpl.Constructor and Description |
---|
Stub() |
Modifier and Type | Method and Description |
---|---|
void |
connect(ORB orb)
Finds the suitable
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.
|
_get_codebase
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override
public Stub()
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)
public boolean equals(Object obj)
equals
in class ObjectImpl
obj
- the other object to compare.Object.hashCode()
public String toString()
toString
in class ObjectImpl
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
public void connect(ORB orb) throws RemoteException
Finds the suitable 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
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 ORB.connect(org.omg.CORBA.Object)
.
Many useful POA features remain unaccessible. A better alternative it might
be to generate a 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 orb.omg.PortableServer
package). The
obtained CORBA object can be narrowed into stub using
PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
.
It is frequently easier to call PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote)
rather
than this method.
orb
- the ORB where the Stub must be connected.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.