public final class GrpcServer extends Object
GrpcChannelBuilder
.Constructor and Description |
---|
GrpcServer(io.grpc.Server server,
AuthenticationServer authServer,
com.google.common.io.Closer closer,
long serverShutdownTimeoutMs)
Create a new instance of
GrpcServer . |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination()
Waits until the server is terminated.
|
AuthenticationServer |
getAuthenticationServer() |
int |
getBindPort() |
boolean |
isServing() |
boolean |
shutdown()
Shuts down the server.
|
GrpcServer |
start()
Start serving.
|
String |
toString() |
public GrpcServer(io.grpc.Server server, AuthenticationServer authServer, com.google.common.io.Closer closer, long serverShutdownTimeoutMs)
GrpcServer
.server
- the wrapped serverauthServer
- the authentication servercloser
- resources to close during shutting down of this serverserverShutdownTimeoutMs
- server shutdown timeout in millisecondspublic AuthenticationServer getAuthenticationServer()
public GrpcServer start() throws IOException
GrpcServer
IOException
- when unable to start servingpublic int getBindPort()
public boolean shutdown()
true
if the server was successfully terminatedInterruptedException
public void awaitTermination()
public boolean isServing()
Copyright © 2023. All Rights Reserved.