Class GRpcServerProperties
java.lang.Object
org.lognet.springboot.grpc.autoconfigure.GRpcServerProperties
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@ConfigurationProperties("grpc")
public class GRpcServerProperties
extends Object
implements org.springframework.beans.factory.InitializingBean
Created by alexf on 26-Jan-16.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIn process server name.getPort()gRPC server portintNumber of seconds to wait for preexisting calls to finish before shutting down.intbooleanEnables the embedded grpc server.booleanEnables server reflection using ProtoReflectionService.voidvoidsetEnabled(boolean enabled)Enables the embedded grpc server.voidsetEnableReflection(boolean enableReflection)Enables server reflection using ProtoReflectionService.voidsetInProcessServerName(String inProcessServerName)In process server name.voidsetNettyServer(GRpcServerProperties.NettyServerProperties nettyServer)voidgRPC server portvoidvoidvoidsetShutdownGrace(int shutdownGrace)Number of seconds to wait for preexisting calls to finish before shutting down.voidsetStartUpPhase(int startUpPhase)
-
Field Details
-
DEFAULT_GRPC_PORT
public static final int DEFAULT_GRPC_PORT- See Also:
- Constant Field Values
-
-
Constructor Details
-
GRpcServerProperties
public GRpcServerProperties()
-
-
Method Details
-
onServerStarted
-
getPortOrDefault
-
getRunningPort
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getPort
gRPC server port -
getSecurity
-
getRecovery
-
getNettyServer
-
getStartUpPhase
public int getStartUpPhase() -
isEnabled
public boolean isEnabled()Enables the embedded grpc server. -
getInProcessServerName
In process server name. If the value is not empty, the embedded in-process server will be created and started. -
isEnableReflection
public boolean isEnableReflection()Enables server reflection using ProtoReflectionService. Available only from gRPC 1.3 or higher. -
getShutdownGrace
public int getShutdownGrace()Number of seconds to wait for preexisting calls to finish before shutting down. A negative value is equivalent to an infinite grace period -
setPort
gRPC server port -
setSecurity
-
setRecovery
-
setNettyServer
-
setStartUpPhase
public void setStartUpPhase(int startUpPhase) -
setEnabled
public void setEnabled(boolean enabled)Enables the embedded grpc server. -
setInProcessServerName
In process server name. If the value is not empty, the embedded in-process server will be created and started. -
setEnableReflection
public void setEnableReflection(boolean enableReflection)Enables server reflection using ProtoReflectionService. Available only from gRPC 1.3 or higher. -
setShutdownGrace
public void setShutdownGrace(int shutdownGrace)Number of seconds to wait for preexisting calls to finish before shutting down. A negative value is equivalent to an infinite grace period
-