Class NettyGrpcServer

  • All Implemented Interfaces:
    GrpcServer

    public final class NettyGrpcServer
    extends java.lang.Object
    implements GrpcServer
    implementation grpc server with NettyGrpcServer.
    • Constructor Detail

      • NettyGrpcServer

        public NettyGrpcServer​(ChaincodeBase chaincodeBase,
                               ChaincodeServerProperties chaincodeServerProperties)
                        throws java.io.IOException
        init netty grpc server.
        Parameters:
        chaincodeBase - - chaincode implementation (invoke, init)
        chaincodeServerProperties - - setting for grpc server
        Throws:
        java.io.IOException
    • Method Detail

      • start

        public void start()
                   throws java.io.IOException
        start grpc server.
        Specified by:
        start in interface GrpcServer
        Throws:
        java.io.IOException
      • blockUntilShutdown

        public void blockUntilShutdown()
                                throws java.lang.InterruptedException
        Waits for the server to become terminated.
        Specified by:
        blockUntilShutdown in interface GrpcServer
        Throws:
        java.lang.InterruptedException
      • stop

        public void stop()
        shutdown now grpc server.
        Specified by:
        stop in interface GrpcServer