Package org.lognet.springboot.grpc
Class GRpcServerRunner
java.lang.Object
org.lognet.springboot.grpc.GRpcServerRunner
- All Implemented Interfaces:
org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
Hosts embedded gRPC server.
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionGRpcServerRunner(Consumer<io.grpc.ServerBuilder<?>> configurator, io.grpc.ServerBuilder<?> serverBuilder) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Constructor Details
-
GRpcServerRunner
public GRpcServerRunner(Consumer<io.grpc.ServerBuilder<?>> configurator, io.grpc.ServerBuilder<?> serverBuilder)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-