Package org.summerboot.jexpress.nio.grpc
Class GRPCClientConfig
java.lang.Object
org.summerboot.jexpress.boot.config.BootConfig
org.summerboot.jexpress.nio.grpc.GRPCClientConfig
- All Implemented Interfaces:
JExpressConfig
- Author:
- Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
-
Nested Class Summary
Nested classes/interfaces inherited from class org.summerboot.jexpress.boot.config.BootConfig
BootConfig.ThreadingMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilderprotected Listprotected static final Stringprotected static final Stringprotected KeyManagerFactoryprotected Stringprotected String[]protected TrustManagerFactoryprotected URIFields inherited from class org.summerboot.jexpress.boot.config.BootConfig
BR, cfgFile, configName, CPU_CORE, DESC_KMF, DESC_PLAINPWD, DESC_TMF, FILENAME_KEYSTORE, FILENAME_SRC_TRUSTSTORE, generateTemplate, logger, props -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidio.grpc.netty.shaded.io.grpc.netty.NettyChannelBuildergetKmf()io.grpc.NameResolverProviderString[]getTmf()getUri()protected voidloadCustomizedConfigs(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) static voidprotected voidpreLoad(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) voidshutdown()Methods inherited from class org.summerboot.jexpress.boot.config.BootConfig
buildThreadPoolExecutor, createIfNotExist, generateTemplate, getCfgFile, getProperties, info, instance, load, loadField, name, temp, updateConfigFile, updateFilePath
-
Field Details
-
FILENAME_TRUSTSTORE_4CLIENT
- See Also:
-
ID
- See Also:
-
uri
@Config(key="gRpc.client.target.url", defaultValue="grpc:///", desc="grpc:///\ngrpc://127.0.0.1:8424\nunix:/tmp/grpcsrver.socket") protected volatile URI uri -
sslProtocols
-
ciphers
-
kmf
@ConfigHeader(title="2. gRpc.client keystore") @Config(key="gRpc.client.ssl.KeyStore", StorePwdKey="gRpc.client.ssl.KeyStorePwd", AliasKey="gRpc.client.ssl.KeyAlias", AliasPwdKey="gRpc.client.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 -
tmf
@ConfigHeader(title="3. gRpc.client truststore") @Config(key="gRpc.client.ssl.TrustStore", StorePwdKey="gRpc.client.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 -
overrideAuthority
@Config(key="gRpc.client.ssl.overrideAuthority", predefinedValue="server2.4096.jexpress.org", desc="NOT for PRODUCTION! Set server certificate DNS name here when server is not yet running on its certificate Subject Alternative Names (SAN)") protected volatile String overrideAuthority -
channelBuilder
protected volatile io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder channelBuilder
-
-
Constructor Details
-
GRPCClientConfig
protected GRPCClientConfig()
-
-
Method Details
-
main
-
generateTemplate_keystore
-
generateTemplate_truststore
-
preLoad
- Overrides:
preLoadin classBootConfig
-
loadCustomizedConfigs
protected void loadCustomizedConfigs(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) throws IOException - Specified by:
loadCustomizedConfigsin classBootConfig- Throws:
IOException
-
shutdown
public void shutdown() -
getLoadBalancingServers
-
getLoadBalancingPolicy
-
getNameResolverProvider
public io.grpc.NameResolverProvider getNameResolverProvider() -
getUri
-
getSslProtocols
-
getCiphers
-
getKmf
-
getTmf
-
getOverrideAuthority
-
getChannelBuilder
public io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder getChannelBuilder()
-