public class GrpcPlugin extends AnyRpcPlugin
| Constructor and Description |
|---|
GrpcPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
blockUntilShutdown()
Runs the main loop for the server and waits for the server to shutdown.
|
int |
getServerPort() |
void |
initialize(int serverPort)
Initializes the plugin, possibly creating any sockets/files/channels/connections
needed.
|
boolean |
serverStarted()
Returns true if the server has been started and has not stopped.
|
void |
shutdown()
Performs any actions that are necessary to shut down any clients or servers started from this
plugin.
|
void |
startServer(EvaluationRuntimeServerInterface evaluationRuntime,
CloneControllerServerInterface cloneController)
Starts the server using the two specified implementations of the
RPC-agnostic EvaluationRuntime and CloneController interfaces.
|
void |
stopServer()
Stops the server.
|
Runnable |
traceContextPropagating(Runnable runnable)
Wraps the provided
Runnable so as to assure propagation of the tracing context. |
public void initialize(int serverPort)
AnyRpcPlugininitialize in class AnyRpcPluginserverPort - the port to listen for RPCs on.public void startServer(EvaluationRuntimeServerInterface evaluationRuntime, CloneControllerServerInterface cloneController)
AnyRpcPluginstartServer in class AnyRpcPluginevaluationRuntime - the evaluation runtime service implementationcloneController - the clone controller service implementationpublic int getServerPort()
public boolean serverStarted()
AnyRpcPluginserverStarted in class AnyRpcPluginpublic void blockUntilShutdown()
AnyRpcPluginThis method MUST be called from the same thread that called
AnyRpcPlugin.startServer(EvaluationRuntimeServerInterface, CloneControllerServerInterface).
blockUntilShutdown in class AnyRpcPluginpublic void stopServer()
AnyRpcPluginstopServer in class AnyRpcPluginpublic void shutdown()
AnyRpcPluginshutdown in class AnyRpcPluginpublic Runnable traceContextPropagating(Runnable runnable)
AnyRpcPluginRunnable so as to assure propagation of the tracing context.traceContextPropagating in class AnyRpcPluginrunnable - the Runnable to wrapCopyright © 2022. All rights reserved.