Package org.hyperledger.fabric.shim
Class NettyGrpcServer
- java.lang.Object
-
- org.hyperledger.fabric.shim.NettyGrpcServer
-
- All Implemented Interfaces:
GrpcServer
public final class NettyGrpcServer extends java.lang.Object implements GrpcServer
implementation grpc server with NettyGrpcServer.
-
-
Constructor Summary
Constructors Constructor Description NettyGrpcServer(ChaincodeBase chaincodeBase, ChaincodeServerProperties chaincodeServerProperties)init netty grpc server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblockUntilShutdown()Waits for the server to become terminated.voidstart()start grpc server.voidstop()shutdown now grpc server.
-
-
-
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.IOExceptionstart grpc server.- Specified by:
startin interfaceGrpcServer- Throws:
java.io.IOException
-
blockUntilShutdown
public void blockUntilShutdown() throws java.lang.InterruptedExceptionWaits for the server to become terminated.- Specified by:
blockUntilShutdownin interfaceGrpcServer- Throws:
java.lang.InterruptedException
-
stop
public void stop()
shutdown now grpc server.- Specified by:
stopin interfaceGrpcServer
-
-