public class WsonrpcEndpoint extends Object implements WsonrpcRemote
| 限定符和类型 | 字段和说明 |
|---|---|
protected WsonrpcControl |
wsonrpcControl |
| 限定符 | 构造器和说明 |
|---|---|
protected |
WsonrpcEndpoint(WsonrpcConfig config) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> Future<T> |
asyncInvoke(String handleName,
String methodName,
Object[] args,
Class<T> returnType)
异步调用远程的方法。
|
void |
disconnect() |
protected WsonrpcSession |
getSession() |
String |
getSessionId() |
void |
invoke(String handleName,
String methodName,
Object[] args)
同步调用远程的方法。
|
<T> T |
invoke(String handleName,
String methodName,
Object[] args,
Class<T> returnType,
int timeout)
同步调用远端方法,并返回指定类型的调用结果。
|
boolean |
isConnected() |
protected void |
offline() |
protected void |
online(WsonrpcSession session) |
void |
ping() |
protected void |
verifyOnline() |
protected final WsonrpcControl wsonrpcControl
protected WsonrpcEndpoint(WsonrpcConfig config)
protected final void online(WsonrpcSession session)
protected final void offline()
protected WsonrpcSession getSession()
protected void verifyOnline()
throws WsonrpcException
WsonrpcExceptionpublic boolean isConnected()
isConnected 在接口中 WsonrpcRemotepublic String getSessionId()
getSessionId 在接口中 WsonrpcRemotepublic void disconnect()
throws Exception
disconnect 在接口中 WsonrpcRemoteExceptionpublic void ping()
throws Exception
ping 在接口中 WsonrpcRemoteExceptionpublic void invoke(String handleName, String methodName, Object[] args) throws IOException, WsonrpcException
Remoteinvoke 在接口中 RemoteIOExceptionWsonrpcExceptionpublic <T> T invoke(String handleName, String methodName, Object[] args, Class<T> returnType, int timeout) throws IOException, WsonrpcException
Remoteinvoke 在接口中 Remotetimeout - 超时时间,0表示永不超时。单位为TimeUnit.MILLISECONDSIOExceptionWsonrpcExceptionpublic <T> Future<T> asyncInvoke(String handleName, String methodName, Object[] args, Class<T> returnType) throws IOException, WsonrpcException
RemoteasyncInvoke 在接口中 RemoteIOExceptionWsonrpcExceptionCopyright © 2016. All rights reserved.