public class GrpcServerLifecycle
extends java.lang.Object
implements org.springframework.context.SmartLifecycle
| Constructor and Description |
|---|
GrpcServerLifecycle(GrpcServerFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createAndStartGrpcServer()
Creates and starts the grpc server.
|
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
protected void |
stopAndReleaseGrpcServer()
Initiates an orderly shutdown of the grpc server and releases the references to the server.
|
public GrpcServerLifecycle(GrpcServerFactory factory)
public void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecycleprotected void createAndStartGrpcServer()
throws java.io.IOException
java.io.IOException - If the server is unable to bind the port.protected void stopAndReleaseGrpcServer()