package com.oy.grpc.client;
import java.lang.reflect.Method;
import java.util.concurrent.TimeUnit;
import com.oy.grpc.BookServiceGrpc;
import com.oy.grpc.GrpcClientPool;
import com.oy.grpc.GrpcLib.GrpcReply;
import com.oy.grpc.GrpcLib.addBookRequest;
import com.oy.grpc.GrpcLib.getUserByIdRequest;
import com.oy.grpc.UserServiceGrpc;
import com.oy.utils.UtilFunctions;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.StatusRuntimeException;public classGrpcClient {public static String host = "localhost";privatefinal ManagedChannel channel;privatefinal UserServiceGrpc.UserServiceBlockingStub userBlockingStub;privatefinal BookServiceGrpc.BookServiceBlockingStub bookBlockingStub;public GrpcClient(String host, intport) {
channel=ManagedChannelBuilder.forAddress(host, port).usePlaintext(