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)。
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已经连接到一个不同的球比
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.