public class RpcMethodInfo extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected Type[] |
inputClasses |
protected Method |
method |
protected String |
methodName |
protected NSHeadMeta |
nsHeadMeta |
protected Type |
outputClass |
protected String |
serviceName |
protected Object |
target |
protected ThreadPool |
threadPool |
| 构造器和说明 |
|---|
RpcMethodInfo(Method method) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getInputSerializedSize(Object input)
get serialized size of request proto instance
|
int |
getOutputSerializedSize(Object output)
get serialized size of response proto instance
|
Object |
inputDecode(byte[] input)
decode request at server side
|
Object |
inputDecode(io.netty.buffer.ByteBuf input)
decode request at server side
|
Object |
inputDecode(DynamicCompositeByteBuf input) |
byte[] |
inputEncode(Object input)
encode request at client inside
|
void |
inputWriteToStream(Object input,
com.google.protobuf.CodedOutputStream stream)
encode request at client inside
|
Object |
outputDecode(byte[] output)
decode response at client side
|
Object |
outputDecode(io.netty.buffer.ByteBuf output)
decode response at client side
|
Object |
outputDecode(DynamicCompositeByteBuf output) |
byte[] |
outputEncode(Object output)
encode response proto instance at server side
|
void |
outputWriteToStream(Object output,
com.google.protobuf.CodedOutputStream stream)
encode response to stream at server side
|
protected Method method
protected String serviceName
protected String methodName
protected Type[] inputClasses
protected Type outputClass
protected NSHeadMeta nsHeadMeta
protected Object target
protected ThreadPool threadPool
public RpcMethodInfo(Method method)
public byte[] inputEncode(Object input) throws IOException
input - the inputIOException - Signals that an I/O exception has occurred.public void inputWriteToStream(Object input, com.google.protobuf.CodedOutputStream stream) throws IOException
input - requeststream - out buffer streamIOException - io exceptionpublic Object outputDecode(byte[] output) throws IOException
output - response byte arrayIOException - Signals that an I/O exception has occurred.public Object outputDecode(io.netty.buffer.ByteBuf output) throws IOException
output - response netty ByteBufIOExceptionpublic Object outputDecode(DynamicCompositeByteBuf output) throws IOException
IOExceptionpublic Object inputDecode(byte[] input) throws IOException
input - request byte arrayIOExceptionpublic Object inputDecode(io.netty.buffer.ByteBuf input) throws IOException
input - request netty ByteBufIOExceptionpublic Object inputDecode(DynamicCompositeByteBuf input) throws IOException
IOExceptionpublic byte[] outputEncode(Object output) throws IOException
output - response proto instanceIOExceptionpublic void outputWriteToStream(Object output, com.google.protobuf.CodedOutputStream stream) throws IOException
output - response objectstream - output streamIOExceptionpublic int getInputSerializedSize(Object input) throws IOException
input - proto instanceIOExceptionpublic int getOutputSerializedSize(Object output) throws IOException
output - response objectIOExceptionCopyright © 2019 Baidu, Inc.. All rights reserved.