|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.omg.CORBA.portable.ObjectImpl
org.omg.CORBA_2_3.portable.ObjectImpl
javax.rmi.CORBA.Stub
public abstract class Stub
A Stub descendants provide access to the object on the client side. This base
class implements methods, required for remote or local invocation using CORBA
mechanisms. The most of the functionality is forwarded to the stub delegate.
This delegate can be altered by setting the system property
"javax.rmi.CORBA.StubClass" to the name of the alternative class that must
implement StubDelegate
. Hence Stub contains two delegates, one for
Stub-related operations and another inherited from the ObjectImpl.
Constructor Summary | |
---|---|
Stub()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.omg.CORBA_2_3.portable.ObjectImpl |
---|
_get_codebase |
Methods inherited from class org.omg.CORBA.portable.ObjectImpl |
---|
_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 |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Stub()
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |