GrpcServer
Available in a dev version: 0․11․0-grpc-186
How to configure
Server for listening for and dispatching incoming calls. It is not expected to be implemented by application code or interceptors.
Properties
Returns whether the server is shutdown. Shutdown servers reject any new calls but may still have some calls being processed.
Returns whether the server is terminated. Terminated servers have no running calls and relevant resources released (like TCP connections).
Returns the port number the server is listening on. This can return -1 if there is no actual port or the result otherwise doesn't make sense. The result is undefined after the server is terminated. If there are multiple possible ports, this will return one arbitrarily. Implementations are encouraged to return the same port on each call.
Functions
Waits for the server to become terminated, giving up if the timeout is reached.
Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected. After this call returns, this server has released the listening socket(s) and may be reused by another server.
Initiates a forceful shutdown in which preexisting and new calls are rejected. Although forceful, the shutdown process is still not instantaneous; isTerminated will likely return false immediately after this method returns. After this call returns, this server has released the listening socket(s) and may be reused by another server.
Bind and start the server. After this call returns, clients may begin connecting to the listening socket(s).