public class PortableRemoteObject extends Object
| Modifier | Constructor and Description | 
|---|---|
| protected  | PortableRemoteObject()
              通过调用 
              exportObject(this)对象。 | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | connect(Remote target, Remote source)
              使远程对象准备好进行远程通信。 
             | 
| static void | exportObject(Remote obj)
              使服务器对象准备好接收远程调用。 
             | 
| static Object | narrow(Object narrowFrom, 类 narrowTo)
              检查以确保远程或抽象接口类型的对象可以转换为所需类型。 
             | 
| static Remote | toStub(Remote obj)
              返回给定服务器对象的存根。 
             | 
| static void | unexportObject(Remote obj)
              从运行时取消注册服务器对象,允许对象可用于垃圾回收。 
             | 
protected PortableRemoteObject()
                        throws RemoteException 
          exportObject(this)来 
           exportObject(this)对象。 
          RemoteException - 如果导出失败。 
           public static void exportObject(Remote obj) throws RemoteException
obj - 要导出的服务器对象。 
           RemoteException - 如果导出失败。 
           public static Remote toStub(Remote obj) throws NoSuchObjectException
obj - 需要存根的服务器对象。 
            必须是PortableRemoteObject的一个子类,或者以前被呼叫的目标exportObject(java.rmi.Remote) 。 
           NoSuchObjectException - 如果无法为给定的服务器对象找到存根。 
           public static void unexportObject(Remote obj) throws NoSuchObjectException
obj - 要取消导出的对象。 
           NoSuchObjectException - 如果远程对象当前未导出。 
           public static Object narrow(Object narrowFrom, 类 narrowTo) throws ClassCastException
narrowFrom - 要检查的对象。 
           narrowTo - 所需类型。 
           ClassCastException - 如果narrowFrom不能被转换为narrowTo。 
           public static void connect(Remote target, Remote source) throws RemoteException
Stub.connect(org.omg.CORBA.ORB)方法。 
          target - 要连接的对象。 
           source - 以前连接的对象。 
           RemoteException - 如果 
            source未连接或 
            target已经连接到不同的ORB比 
            source 。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.