public interface RemoteRef extends Externalizable
RemoteRef
代表一个远程对象的句柄。一个
RemoteStub
使用远程引用进行远程方法调用远程对象。
RemoteStub
Modifier and Type | Field and Description |
---|---|
static String |
packagePrefix
初始化服务器包前缀:假设服务器参考类的实现(例如,unicastref,unicastserverref)位于由前缀定义的包。
|
static long |
serialVersionUID
表明JDK 1.1类X版本的兼容性。
|
Modifier and Type | Method and Description |
---|---|
void |
done(RemoteCall call)
过时的。
1.2式单不再使用这种方法。而不是使用一个序列的方法调用的远程引用(
newCall ,invoke ,和done ),一个使用一个单一的方法,invoke(Remote, Method, Object[], int) ,在远程参考进行参数编组,执行远程方法的返回值和解包。
|
String |
getRefClass(ObjectOutput out)
返回引用类型进行序列化到流出来的类的名字。
|
void |
invoke(RemoteCall call)
过时的。
1.2式单不再使用这种方法。而不是使用一个序列的方法调用的远程引用(
newCall ,invoke ,和done ),一个使用一个单一的方法,invoke(Remote, Method, Object[], int) ,在远程参考进行参数编组,执行远程方法的返回值和解包。
|
Object |
invoke(Remote obj, 方法 method, Object[] params, long opnum)
调用一个方法。
|
RemoteCall |
newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
过时的。
1.2式单不再使用这种方法。而不是使用一个序列的方法调用存根上的远程参考(
newCall ,invoke ,和done ),一个使用一个单一的方法,invoke(Remote, Method, Object[], int) ,在远程参考进行参数编组,执行远程方法的返回值和解包。
|
boolean |
remoteEquals(RemoteRef obj)
比较两个相等的远程对象。
|
int |
remoteHashCode()
返回一个远程对象的hashCode。
|
String |
remoteToString()
返回一个表示此远程对象的引用的字符串。
|
readExternal, writeExternal
static final long serialVersionUID
static final String packagePrefix
Object invoke(Remote obj, 方法 method, Object[] params, long opnum) throws 异常
obj
-包含remoteref对象(例如,该对象的remotestub。
method
-被调用的方法
params
-参数列表
opnum
-哈希值可以用来表示方法
异常
如果远程方法调用期间发生任何异常
@Deprecated RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash) throws RemoteException
newCall
,invoke
,和done
),一个使用一个单一的方法,invoke(Remote, Method, Object[], int)
,在远程参考进行参数编组,执行远程方法的返回值和解包。
obj
远程存根来打电话
op
-短线操作数组
opnum
操作数
hash
存根/骨架接口散列
RemoteException
如果未能启动新的远程调用
invoke(Remote,java.lang.reflect.Method,Object[],long)
@Deprecated void invoke(RemoteCall call) throws 异常
newCall
,invoke
,和done
),一个使用一个单一的方法,invoke(Remote, Method, Object[], int)
,在远程参考进行参数编组,执行远程方法的返回值和解包。
call
对象代表远程调用
异常
-如果在远程方法发生任何异常
invoke(Remote,java.lang.reflect.Method,Object[],long)
@Deprecated void done(RemoteCall call) throws RemoteException
newCall
,invoke
,和done
),一个使用一个单一的方法,invoke(Remote, Method, Object[], int)
,在远程参考进行参数编组,执行远程方法的返回值和解包。
call
对象代表远程调用
RemoteException
-如果在调用远程清理发生错误
invoke(Remote,java.lang.reflect.Method,Object[],long)
String getRefClass(ObjectOutput out)
out
-输出流的引用将被序列化
int remoteHashCode()
Hashtable
boolean remoteEquals(RemoteRef obj)
obj
-比较对象
Hashtable
String remoteToString()
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.