javax.rmi.CORBA

Class Stub

Implemented Interfaces:
Object, Serializable
Known Direct Subclasses:
_Remote_Stub

public abstract class Stub
extends ObjectImpl
implements Serializable

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.
See Also:
Serialized Form

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, equals, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

connect

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(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(Object,Class).

It is frequently easier to call PortableRemoteObject.connect(Remote,Remote) 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.

equals

public boolean equals(Object obj)
The stubs are equal if they point to the same remote object.
Overrides:
equals in interface ObjectImpl

hashCode

public int hashCode()
Returns the same hashcode for all stubs that point to the same remote object.
Overrides:
hashCode in interface Object

toString

public String toString()
Get the string representation of this Stub.
Overrides:
toString in interface ObjectImpl
Returns:
the CORBA IOR reference.

Stub.java -- Copyright (C) 2004, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.