@Test public void testInputDecode4() throws Exception { Method method = EchoService.class.getMethod("echo", Echo.EchoRequest.class); ProtobufRpcMethodInfo rpcMethodInfo = new ProtobufRpcMethodInfo(method); Echo.EchoRequest request = Echo.EchoRequest.newBuilder().setMessage("hello").build(); byte[] bytes = request.toByteArray(); ByteBuf byteBuf = Unpooled.wrappedBuffer(bytes); DynamicCompositeByteBuf compositeByteBuf = new DynamicCompositeByteBuf(byteBuf); Echo.EchoRequest request1 = (Echo.EchoRequest) rpcMethodInfo.inputDecode(compositeByteBuf); Assert.assertTrue(request1.getMessage().equals(request.getMessage())); }
public Object inputDecode(byte[] input) throws IOException { return inputInstance.getParserForType().parseFrom(input); }
ProtobufRpcMethodInfo extends RpcMethodInfo { public Object inputDecode(byte[] input) throws IOException { return inputInstance.getParserForType().parseFrom(input); } }
ProtobufRpcMethodInfo extends RpcMethodInfo { public Object inputDecode(byte[] input) throws IOException { return inputInstance.getParserForType().parseFrom(input); } ProtobufRpcMethodInfo(Method method); }
ProtobufRpcMethodInfo extends RpcMethodInfo { public Object inputDecode(byte[] input) throws IOException { return inputInstance.getParserForType().parseFrom(input); } ProtobufRpcMethodInfo(Method method); @Override byte[] inputEncode(Object input); @Override void inputWriteToStream(Object input, CodedOutputStream stream); @Override Object outputDecode(byte[] output); @Override Object outputDecode(ByteBuf output); @Override Object outputDecode(DynamicCompositeByteBuf output); Object outputDecode(InputStream stream); Object inputDecode(byte[] input); Object inputDecode(byte[] input, int offset, int len); Object inputDecode(ByteBuf input); Object inputDecode(DynamicCompositeByteBuf input); Object inputDecode(InputStream stream); byte[] outputEncode(Object output); @Override void outputWriteToStream(Object output, CodedOutputStream stream); @Override int getInputSerializedSize(Object input); @Override int getOutputSerializedSize(Object output); }
ProtobufRpcMethodInfo extends RpcMethodInfo { public Object inputDecode(byte[] input) throws IOException { return inputInstance.getParserForType().parseFrom(input); } ProtobufRpcMethodInfo(Method method); @Override byte[] inputEncode(Object input); @Override void inputWriteToStream(Object input, CodedOutputStream stream); @Override Object outputDecode(byte[] output); @Override Object outputDecode(ByteBuf output); @Override Object outputDecode(DynamicCompositeByteBuf output); Object outputDecode(InputStream stream); Object inputDecode(byte[] input); Object inputDecode(byte[] input, int offset, int len); Object inputDecode(ByteBuf input); Object inputDecode(DynamicCompositeByteBuf input); Object inputDecode(InputStream stream); byte[] outputEncode(Object output); @Override void outputWriteToStream(Object output, CodedOutputStream stream); @Override int getInputSerializedSize(Object input); @Override int getOutputSerializedSize(Object output);  }