Class GRpcServerManager
java.lang.Object
com.netflix.genie.web.agent.apis.rpc.servers.GRpcServerManager
- All Implemented Interfaces:
AutoCloseable
A wrapper around a
Server
instance which implements AutoCloseable
to control startup and shutdown
along with the application.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GRpcServerManager
Constructor.- Parameters:
server
- TheServer
instance to manage- Throws:
IllegalStateException
- If the server can't be started
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getServerPort
public int getServerPort()Get the port the gRPCServer
is listening on.- Returns:
- The port or -1 if the server isn't currently listening on any port.
-