| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
public abstract class RemoteObject
该 RemoteObject 类实现远程对象的 java.lang.Object 行为。RemoteObject 通过实现 hashCode、equals 和 toString 方法提供 Object 的远程语义。
| 字段摘要 | |
|---|---|
| protected  RemoteRef | ref对象的远程引用。 | 
| 构造方法摘要 | |
|---|---|
| protected  | RemoteObject()创建远程对象。 | 
| protected  | RemoteObject(RemoteRef newref)创建一个用指定远程引用初始化的远程对象。 | 
| 方法摘要 | |
|---|---|
|  boolean | equals(Object obj)比较两个远程对象是否相等。 | 
|  RemoteRef | getRef()返回远程对象的远程引用。 | 
|  int | hashCode()返回远程对象的哈希码。 | 
|  String | toString()返回表示此远程对象的值的 String。 | 
| static Remote | toStub(Remote obj)返回作为参数传递的远程对象 obj的 stub。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| 字段详细信息 | 
|---|
protected transient RemoteRef ref
| 构造方法详细信息 | 
|---|
protected RemoteObject()
protected RemoteObject(RemoteRef newref)
newref - 远程引用| 方法详细信息 | 
|---|
public RemoteRef getRef()
注:从此方法返回的对象可以是特定于实现的类的实例。该 RemoteObject 通过其自定义 writeObject 和 readObject 方法的行为确保其实例远程引用的序列化可移植性。不应在 RemoteObject 包装器实例之外序列化 RemoteRef 的实例,否则其结果可能无法移植。
public static Remote toStub(Remote obj)
                     throws NoSuchObjectException
obj 的 stub。此操作仅在导出对象之后 有效。
obj - 需要其 stub 的远程对象
obj 的 stub。
NoSuchObjectException - 如果无法找到远程对象的 stub。public int hashCode()
Object 中的 hashCodeHashtablepublic boolean equals(Object obj)
equals 方法的结果将此远程对象委托为参数。
Object 中的 equalsobj - 要与之比较的对象
Hashtablepublic String toString()
Object 中的 toString| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。