Class GRPCServerConfig

java.lang.Object
org.summerboot.jexpress.boot.config.BootConfig
org.summerboot.jexpress.nio.grpc.GRPCServerConfig
All Implemented Interfaces:
JExpressConfig

public class GRPCServerConfig extends BootConfig
Author:
Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
  • Field Details

    • FILENAME_TRUSTSTORE_4SERVER

      protected static final String FILENAME_TRUSTSTORE_4SERVER
      See Also:
    • ID

      protected static final String ID
      See Also:
    • cfg

      public static final GRPCServerConfig cfg
    • bindingAddresses

      @ConfigHeader(title="1. gRpc.server Network Listeners", format="ip1:port1, ip2:port2, ..., ipN:portN", example="192.168.1.10:8424, 127.0.0.1:8424, 0.0.0.0:8424") @Config(key="gRpc.server.bindings", predefinedValue="0.0.0.0:8424, 0.0.0.0:8425", required=true) protected volatile List<InetSocketAddress> bindingAddresses
    • autoStart

      @Config(key="gRpc.server.autostart", defaultValue="true") protected volatile boolean autoStart
    • CallerAddressFilterOption

      @Config(key="gRpc.server.CallerAddressFilter.option", defaultValue="HostName", desc="valid value = String, HostString, HostName, AddressStirng, HostAddress, AddrHostName, CanonicalHostName") protected volatile GeoIpUtil.CallerAddressFilterOption CallerAddressFilterOption
    • callerAddressFilterRegexPrefix

      @Config(key="gRpc.server.CallerAddressFilter.Regex.Prefix", desc="A non-blank prefix to mark a string as Regex in both Whitelist and Blacklist, blank means all strings are not Regex") protected volatile String callerAddressFilterRegexPrefix
    • callerAddressFilterWhitelist

      @Config(key="gRpc.server.CallerAddressFilter.Whitelist", desc="Whitelist in CSV format, example (when Regex.Prefix = RG): 127.0.0.1, RG^192\\\\.168\\\\.1\\\\.") protected volatile Set<String> callerAddressFilterWhitelist
    • callerAddressFilterBlacklist

      @Config(key="gRpc.server.CallerAddressFilter.Blacklist", desc="Blacklist in CSV format, example (when Regex.Prefix = RG): 10.1.1.40, RG^192\\\\.168\\\\.2\\\\.") protected volatile Set<String> callerAddressFilterBlacklist
    • tpeThreadingMode

      @Config(key="gRpc.server.pool.BizExecutor.mode", defaultValue="VirtualThread", desc="valid value = VirtualThread (default for Java 21+), CPU, IO and Mixed (default for old Java) \n use CPU core + 1 when application is CPU bound\nuse CPU core x 2 + 1 when application is I/O bound\nneed to find the best value based on your performance test result when nio.server.BizExecutor.mode=Mixed") protected volatile BootConfig.ThreadingMode tpeThreadingMode
    • tpeCore

      @Config(key="gRpc.server.pool.coreSize", predefinedValue="0", desc="coreSize 0 = current computer/VM\'s available processors x 2 + 1") protected volatile int tpeCore
    • tpeMax

      @Config(key="gRpc.server.pool.maxSize", predefinedValue="0", desc="maxSize 0 = current computer/VM\'s available processors x 2 + 1") protected volatile int tpeMax
    • tpeQueue

      @Config(key="gRpc.server.pool.queueSize", defaultValue="2147483647", desc="The waiting list size when the pool is full") protected volatile int tpeQueue
    • tpeKeepAliveSeconds

      @Config(key="gRpc.server.pool.keepAliveSeconds", defaultValue="60") protected volatile long tpeKeepAliveSeconds
    • prestartAllCoreThreads

      @Config(key="gRpc.server.pool.prestartAllCoreThreads", defaultValue="false") protected boolean prestartAllCoreThreads
    • allowCoreThreadTimeOut

      @Config(key="gRpc.server.pool.allowCoreThreadTimeOut", defaultValue="false") protected boolean allowCoreThreadTimeOut
    • tpe

      protected ThreadPoolExecutor tpe
    • KEY_kmf_key

      protected static final String KEY_kmf_key
      See Also:
    • KEY_kmf_StorePwdKey

      protected static final String KEY_kmf_StorePwdKey
      See Also:
    • KEY_kmf_AliasKey

      protected static final String KEY_kmf_AliasKey
      See Also:
    • KEY_kmf_AliasPwdKey

      protected static final String KEY_kmf_AliasPwdKey
      See Also:
    • kmf

      @ConfigHeader(title="2. gRpc.server keystore") @Config(key="gRpc.server.ssl.KeyStore", StorePwdKey="gRpc.server.ssl.KeyStorePwd", AliasKey="gRpc.server.ssl.KeyAlias", AliasPwdKey="gRpc.server.ssl.KeyPwd", desc="Path to key store file. Use SSL/TLS when keystore is provided, otherwise use plain socket", callbackMethodName4Dump="generateTemplate_keystore") protected volatile KeyManagerFactory kmf
    • KEY_tmf_key

      protected static final String KEY_tmf_key
      See Also:
    • KEY_tmf_StorePwdKey

      protected static final String KEY_tmf_StorePwdKey
      See Also:
    • tmf

      @ConfigHeader(title="3. gRpc.server truststore") @Config(key="gRpc.server.ssl.TrustStore", StorePwdKey="gRpc.server.ssl.TrustStorePwd", callbackMethodName4Dump="generateTemplate_truststore", desc="Path to trust store file. Auth the remote peer certificate when a truststore is provided, otherwise blindly trust all remote peer certificate") protected volatile TrustManagerFactory tmf
  • Constructor Details

    • GRPCServerConfig

      protected GRPCServerConfig()
  • Method Details