Class LogicModuleServer
- java.lang.Object
-
- es.bsc.dataclay.communication.grpc.services.logicmodule.LogicModuleServer
-
public final class LogicModuleServer extends Object
A sample gRPC server that serve the LogicModule service.
-
-
Constructor Summary
Constructors Constructor Description LogicModuleServer(String srvName, int port, LogicModule lm)Create a LogicModuleServer server listening onport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblockUntilShutdown()Await termination on the main thread since the grpc library uses daemon threads.voidstart()Start serving requests.voidstop()Stop serving requests and shutdown resources.
-
-
-
Constructor Detail
-
LogicModuleServer
public LogicModuleServer(String srvName, int port, LogicModule lm)
Create a LogicModuleServer server listening onport.- Parameters:
srvName- Server nameport- Port.lm- LM impl.
-
-
Method Detail
-
start
public void start() throws IOExceptionStart serving requests.- Throws:
IOException- If some exception occurs.
-
stop
public void stop()
Stop serving requests and shutdown resources.
-
blockUntilShutdown
public void blockUntilShutdown() throws InterruptedExceptionAwait termination on the main thread since the grpc library uses daemon threads.- Throws:
InterruptedException- If some exception occurred.
-
-