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 void
blockUntilShutdown()
Waits for the server to become terminated.void
start()
start grpc server.void
stop()
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.IOException
start grpc server.- Specified by:
start
in interfaceGrpcServer
- Throws:
java.io.IOException
-
blockUntilShutdown
public void blockUntilShutdown() throws java.lang.InterruptedException
Waits for the server to become terminated.- Specified by:
blockUntilShutdown
in interfaceGrpcServer
- Throws:
java.lang.InterruptedException
-
stop
public void stop()
shutdown now grpc server.- Specified by:
stop
in interfaceGrpcServer
-
-