public abstract class RemoteObject extends Object implements Remote, Serializable
RemoteObject
类实现的远程对象的
java.lang.Object
行为。
RemoteObject
提供对象的远程语义的实现方法hashCode,等于和toString。
Modifier | Constructor and Description |
---|---|
protected |
RemoteObject()
创建一个远程对象。
|
protected |
RemoteObject(RemoteRef newref)
创建一个远程对象,用指定的远程引用初始化。
|
protected transient RemoteRef ref
protected RemoteObject()
protected RemoteObject(RemoteRef newref)
newref
远程参考
public RemoteRef getRef()
注:从这个方法返回的对象可能是一个实现特定类的实例。的RemoteObject
确保序列化的类实例的引用可远程通过其自定义writeObject
和readObject
方法的行为。对RemoteRef
实例不可序列化的RemoteObject
包装实例或结果外可移植。
public static Remote toStub(Remote obj) throws NoSuchObjectException
obj
存根。这个手术是唯一有效的之后对象已出口。
obj
-远程对象的存根是必要的
obj
。
NoSuchObjectException
如果远程对象的存根不能被发现。
public int hashCode()
public boolean equals(Object obj)
equals
方法与这个远程对象作为参数的结果。
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.