Name

PortableRemoteObject

Synopsis

This is the base class for server objects that support RMI-IIOP. The interface supports exporting a remote object to accept client requests, generating client stubs for a server object, and for safely casting references to remote objects (using the narrow() method), among other things. This interface is important in CORBA and EJB contexts when it is desirable to keep your code portable with respect to both RMI and IIOP remote objects.

public class PortableRemoteObject {
// Protected Constructors
   protected PortableRemoteObject(
        ) throws java.rmi.RemoteException;  
// Public Class Methods
   public static void connect(java.rmi.Remote target, 
        java.rmi.Remote source) throws java.rmi.RemoteException;  
   public static void exportObject(
        java.rmi.Remote obj) throws java.rmi.RemoteException;  
   public static Object narrow(Object narrowFrom, 
        Class narrowTo) throws ClassCastException;  
   public static java.rmi.Remote toStub(
        java.rmi.Remote obj) throws java.rmi.NoSuchObjectException;  
   public static void unexportObject(
        java.rmi.Remote obj) throws java.rmi.NoSuchObjectException;  
}

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.