gnu.javax.rmi.CORBA

Class PortableRemoteObjectDelegateImpl

Implemented Interfaces:
PortableRemoteObjectDelegate

public class PortableRemoteObjectDelegateImpl
extends Object
implements PortableRemoteObjectDelegate

Implements PortableRemoteObjectDelegate.

Method Summary

void
connect(Remote a_target, Remote a_source)
Makes the remote object a_target ready for remote communication using the same communications runtime as for the passed a_source parameter.
void
exportObject(Remote obj)
Find or create a tie for this target and mark it as being used by the given object.
Object
narrow(Object narrowFrom, Class<T> narrowTo)
Narrow the given object to the instance of the given class.
Remote
toStub(Remote ObjImpl)
Get stub for the given implementation, searching by class name pattern.
void
unexportObject(Remote obj)
If the object tie is no longer in use, disconnet it from the orb.

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(Remote a_target,
                    Remote a_source)
            throws RemoteException
Makes the remote object a_target ready for remote communication using the same communications runtime as for the passed a_source parameter. The a_target is connected to the same ORB (and, if applicable, to the same POA) as the a_source.
Specified by:
connect in interface PortableRemoteObjectDelegate
Parameters:
a_target - the target to connect to ORB, must be an instance of either ObjectImpl (Stubs and old-style ties) or Servant (POA-bases ties).
a_source - the object, providing the connection information, must be an instance of either ObjectImpl (Stubs and old-style ties) or Servant (POA-bases ties).
Throws:
RemoteException - if the target is already connected to another ORB.

exportObject

public void exportObject(Remote obj)
            throws RemoteException
Find or create a tie for this target and mark it as being used by the given object.
Specified by:
exportObject in interface PortableRemoteObjectDelegate

narrow

public Object narrow(Object narrowFrom,
                     Class<T> narrowTo)
            throws ClassCastException
Narrow the given object to the instance of the given class. The currently supported narrowing types are: 1. Simple widening conversion.
2. ObjectImpl -> RMI interface.
3. ObjectImpl -> ObjectImpl.
4. Tie -> Remote (implementation)
5. Remote (implementation) -> Tie.
The narrowing has sense only for derived classes.
Specified by:
narrow in interface PortableRemoteObjectDelegate

toStub

public Remote toStub(Remote ObjImpl)
            throws NoSuchObjectException
Get stub for the given implementation, searching by class name pattern. The found stub must implement Remote for this method to succeed.
Specified by:
toStub in interface PortableRemoteObjectDelegate

unexportObject

public void unexportObject(Remote obj)
            throws NoSuchObjectException
If the object tie is no longer in use, disconnet it from the orb.
Specified by:
unexportObject in interface PortableRemoteObjectDelegate

PortableRemoteObjectDelegateImpl.java -- Copyright (C) 2002, 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.