public abstract class AbstractAnnotationRpcHandler extends Object implements RpcHandler, RpcMetaAware
RpcServiceRegistry| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
inputIDl
The input i dl.
|
protected String |
outputIDL
The output idl.
|
| 构造器和说明 |
|---|
AbstractAnnotationRpcHandler(Method method,
Object service,
ProtobufRPCService protobufPRCService)
Instantiates a new abstract annotation rpc handler.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract byte[] |
decodeOutputParam(Object ret)
Decode output param.
|
RpcData |
doHandle(RpcData data)
send data to server.
|
protected RpcData |
doRealHandle(RpcData data)
Do real handle.
|
protected abstract Object |
encodeInputParam(byte[] data)
Encode input param.
|
ServerAttachmentHandler |
getAttachmentHandler()
Gets the attachment handler.
|
ServerAuthenticationDataHandler |
getAuthenticationHandler()
get the authenticationHandler
|
String |
getDescription()
Gets the description.
|
Class |
getInputClass()
Gets the input class.
|
String |
getInputMetaProto()
Gets the input meta proto.
|
protected InvokerInterceptor |
getInterceptor()
Gets the interceptor.
|
Method |
getMethod()
Gets the method.
|
String |
getMethodName()
Gets the method name.
|
String |
getMethodSignature()
Gets the method signature.
|
Class |
getOutputClass()
Gets the output class.
|
String |
getOutputMetaProto()
Gets the output meta proto.
|
Object |
getService()
Gets the service.
|
String |
getServiceName()
Gets the service name.
|
void |
setInterceptor(InvokerInterceptor interceptor)
Sets the interceptor.
|
void |
setServiceName(String serviceName)
Sets the service name.
|
protected String inputIDl
protected String outputIDL
public AbstractAnnotationRpcHandler(Method method, Object service, ProtobufRPCService protobufPRCService)
method - the methodservice - the serviceprotobufPRCService - the protobuf prc servicepublic void setInterceptor(InvokerInterceptor interceptor)
interceptor - the new interceptorprotected InvokerInterceptor getInterceptor()
public Method getMethod()
public Object getService()
RpcHandlergetService 在接口中 RpcHandlerpublic RpcData doHandle(RpcData data) throws Exception
RpcHandlerdoHandle 在接口中 RpcHandlerdata - the dataException - in case of any exception in handleprotected RpcData doRealHandle(RpcData data) throws Exception
data - the dataException - the exceptionprotected abstract byte[] decodeOutputParam(Object ret) throws Exception
ret - the retExceptionprotected abstract Object encodeInputParam(byte[] data) throws Exception
data - the dataExceptionpublic String getMethodSignature()
RpcHandlergetMethodSignature 在接口中 RpcHandlerpublic Class getInputClass()
RpcHandlergetInputClass 在接口中 RpcHandlerpublic Class getOutputClass()
RpcHandlergetOutputClass 在接口中 RpcHandlerpublic String getServiceName()
RpcHandlergetServiceName 在接口中 RpcHandlerpublic void setServiceName(String serviceName)
serviceName - the new service namepublic String getMethodName()
RpcHandlergetMethodName 在接口中 RpcHandlerpublic ServerAttachmentHandler getAttachmentHandler()
public ServerAuthenticationDataHandler getAuthenticationHandler()
public String getInputMetaProto()
RpcMetaAwaregetInputMetaProto 在接口中 RpcMetaAwarepublic String getOutputMetaProto()
RpcMetaAwaregetOutputMetaProto 在接口中 RpcMetaAwarepublic String getDescription()
RpcHandlergetDescription 在接口中 RpcHandlerCopyright © 2022 Baidu, Inc.. All rights reserved.