szetszwo commented on code in PR #1561:
URL: https://github.com/apache/ratis/pull/1561#discussion_r3867776446
##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcConfigKeys.java:
##########
@@ -293,6 +293,22 @@ static void setServicesCustomizer(Parameters parameters,
GrpcServices.Customizer
parameters.put(SERVICES_CUSTOMIZER_PARAMETER, customizer,
SERVICES_CUSTOMIZER_CLASS);
}
+ String TLS_HANDSHAKE_FAILURE_LISTENER_PARAMETER = PREFIX +
".tls.handshake.failure.listener";
+ Class<TlsHandshakeFailureListener> TLS_HANDSHAKE_FAILURE_LISTENER_CLASS =
+ TlsHandshakeFailureListener.class;
Review Comment:
```java
NettyServerBuilder forAddress(SocketAddress address, ServerCredentials
creds)
```
Since the forAddress parameter is ServerCredentials, let's use
ServerCredentials as the class. Then, it will also support other
ServerCredentials.
```java
String CREDENTIALS_PARAMETER = PREFIX + ".credentials";
Class<ServerCredentials> CREDENTIALS_CLASS = ServerCredentials.class;
static ServerCredentials credentials(Parameters parameters) {
return parameters == null ? null
: parameters.get(CREDENTIALS_PARAMETER, CREDENTIALS_CLASS);
}
static void setCredentials(Parameters parameters, ServerCredentials
listener) {
parameters.put(CREDENTIALS_PARAMETER, listener, CREDENTIALS_CLASS);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]