public class WsonrpcControl extends Object implements ServiceRegistry
| 限定符和类型 | 字段和说明 |
|---|---|
protected WsonrpcConfig |
config |
protected JsonRpcControl |
jsonRpcControl |
| 构造器和说明 |
|---|
WsonrpcControl(WsonrpcConfig config) |
| 限定符和类型 | 方法和说明 |
|---|---|
WsonrpcConfig |
getConfig() |
void |
handle(WsonrpcSession session,
byte[] bytes,
WsonrpcErrorProcessor errorProcessor)
处理收到的JSON数据
|
protected void |
handleRequest(WsonrpcSession session,
JsonRpcRequest request) |
void |
invoke(WsonrpcSession session,
String serviceName,
String methodName,
Object[] args) |
Future<Object> |
invoke(WsonrpcSession session,
String serviceName,
String methodName,
Object[] args,
Class<?> returnType) |
<T> ServiceRegistry |
register(String name,
T service,
Class<?>... classes) |
ServiceRegistry |
unregister(String name) |
protected final WsonrpcConfig config
protected final JsonRpcControl jsonRpcControl
public WsonrpcControl(WsonrpcConfig config)
config - public final WsonrpcConfig getConfig()
public Future<Object> invoke(WsonrpcSession session, String serviceName, String methodName, Object[] args, Class<?> returnType) throws IOException, WsonrpcException
session - serviceName - methodName - args - returnType - IOExceptionWsonrpcExceptionpublic void invoke(WsonrpcSession session, String serviceName, String methodName, Object[] args) throws IOException, WsonrpcException
session - serviceName - methodName - args - IOExceptionWsonrpcExceptionpublic void handle(WsonrpcSession session, byte[] bytes, WsonrpcErrorProcessor errorProcessor) throws IOException, WsonrpcException
session - bytes - errorProcessor - IOExceptionWsonrpcExceptionprotected void handleRequest(WsonrpcSession session, JsonRpcRequest request) throws IOException, WsonrpcException
session - request - WsonrpcExceptionIOExceptionpublic <T> ServiceRegistry register(String name, T service, Class<?>... classes)
register 在接口中 ServiceRegistrypublic ServiceRegistry unregister(String name)
unregister 在接口中 ServiceRegistryCopyright © 2016. All rights reserved.