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 void
blockUntilShutdown()
Await termination on the main thread since the grpc library uses daemon threads.void
start()
Start serving requests.void
stop()
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 IOException
Start serving requests.- Throws:
IOException
- If some exception occurs.
-
stop
public void stop()
Stop serving requests and shutdown resources.
-
blockUntilShutdown
public void blockUntilShutdown() throws InterruptedException
Await termination on the main thread since the grpc library uses daemon threads.- Throws:
InterruptedException
- If some exception occurred.
-
-