Class GRpcServerProperties
- java.lang.Object
-
- org.lognet.springboot.grpc.autoconfigure.GRpcServerProperties
-
@ConfigurationProperties("grpc") public class GRpcServerProperties extends java.lang.ObjectCreated by alexf on 26-Jan-16.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGRpcServerProperties.ConsulPropertiesstatic classGRpcServerProperties.NettyServerPropertiesstatic classGRpcServerProperties.SecurityProperties
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_GRPC_PORT
-
Constructor Summary
Constructors Constructor Description GRpcServerProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GRpcServerProperties.ConsulPropertiesgetConsul()java.lang.StringgetInProcessServerName()In process server name.GRpcServerProperties.NettyServerPropertiesgetNettyServer()java.lang.IntegergetPort()gRPC server portjava.lang.IntegergetRunningPort()GRpcServerProperties.SecurityPropertiesgetSecurity()intgetShutdownGrace()Number of seconds to wait for preexisting calls to finish before shutting down.intgetStartUpPhase()voidinit()booleanisEnabled()Enables the embedded grpc server.booleanisEnableReflection()Enables server reflection using ProtoReflectionService.voidsetConsul(GRpcServerProperties.ConsulProperties consul)voidsetEnabled(boolean enabled)Enables the embedded grpc server.voidsetEnableReflection(boolean enableReflection)Enables server reflection using ProtoReflectionService.voidsetInProcessServerName(java.lang.String inProcessServerName)In process server name.voidsetNettyServer(GRpcServerProperties.NettyServerProperties nettyServer)voidsetPort(java.lang.Integer port)gRPC server portvoidsetSecurity(GRpcServerProperties.SecurityProperties security)voidsetShutdownGrace(int shutdownGrace)Number of seconds to wait for preexisting calls to finish before shutting down.voidsetStartUpPhase(int startUpPhase)
-
-
-
Field Detail
-
DEFAULT_GRPC_PORT
public static final int DEFAULT_GRPC_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRunningPort
public java.lang.Integer getRunningPort()
-
init
@PostConstruct public void init()
-
getPort
public java.lang.Integer getPort()
gRPC server port
-
getSecurity
public GRpcServerProperties.SecurityProperties getSecurity()
-
getNettyServer
public GRpcServerProperties.NettyServerProperties getNettyServer()
-
getConsul
public GRpcServerProperties.ConsulProperties getConsul()
-
getStartUpPhase
public int getStartUpPhase()
-
isEnabled
public boolean isEnabled()
Enables the embedded grpc server.
-
getInProcessServerName
public java.lang.String 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
public void setPort(java.lang.Integer port)
gRPC server port
-
setSecurity
public void setSecurity(GRpcServerProperties.SecurityProperties security)
-
setNettyServer
public void setNettyServer(GRpcServerProperties.NettyServerProperties nettyServer)
-
setConsul
public void setConsul(GRpcServerProperties.ConsulProperties consul)
-
setStartUpPhase
public void setStartUpPhase(int startUpPhase)
-
setEnabled
public void setEnabled(boolean enabled)
Enables the embedded grpc server.
-
setInProcessServerName
public void setInProcessServerName(java.lang.String inProcessServerName)
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
-
-