public static interface WsonrpcRequestInterceptor.Context
| 限定符和类型 | 方法和说明 |
|---|---|
void |
executeReply()
触发执行并回复
|
Object |
getParams()
返回参数
|
Object[] |
getParams(Type[] types)
返回适配指定类型的参数数组
|
String |
getParamsAsJson()
返回参数的json
|
String |
getRequestId()
返回请求ID
|
String |
getServiceMethod()
返回请求方法
|
WebSocketSession |
getSession()
返回当前会话
|
boolean |
isNotification()
如果是通知就返回true
|
void |
replyError(JsonRpcError error) |
void |
replyThrowable(Throwable t) |
void |
replyValue(Object result)
回复
|
WebSocketSession getSession()
String getServiceMethod()
String getRequestId()
Object getParams()
String getParamsAsJson() throws JsonException
JsonExceptionboolean isNotification()
void executeReply()
void replyValue(Object result)
result - void replyThrowable(Throwable t)
t - void replyError(JsonRpcError error)
error - Copyright © 2020. All rights reserved.