public class CapsisBridgeServiceProvider
extends java.lang.Object
| Constructor and Description |
|---|
CapsisBridgeServiceProvider(int port,
boolean logToFile)
Create a CapsisBridge server listening on
port using featureFile database. |
CapsisBridgeServiceProvider(io.grpc.ServerBuilder<?> serverBuilder,
int port,
boolean logToFile)
Create a CapsisBridge server using serverBuilder as a base and features as data.
|
| Modifier and Type | Method and 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.
|
public CapsisBridgeServiceProvider(int port,
boolean logToFile)
throws java.lang.Exception
port using featureFile database.port - The port number to bind to. Use 0 to let the OS choose an available portlogToFile - Enables or disables file logging outputjava.lang.Exceptionpublic CapsisBridgeServiceProvider(io.grpc.ServerBuilder<?> serverBuilder,
int port,
boolean logToFile)
throws java.lang.Exception
port - The port number to bind to. Use 0 to let the OS choose an available portlogToFile - Enables or disables file logging outputjava.lang.Exceptionpublic void start()
throws java.lang.Exception
java.lang.Exceptionpublic void stop()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void blockUntilShutdown()
throws java.lang.InterruptedException
java.lang.InterruptedException