Hi folks,

I'm wondering if there is a particular reason that *Builder classes in 
Netty are marked final?

I have a use case where I would like to allow users to update the 
configuration of their client or server SSL connections, for example, to 
select the preferred protocols, ciphers, etc. My thinking is that 
SslContextBuilder already has all of the necessary fields for storing these 
preferences, and indeed, should be the preferred way of doing so, because 
otherwise I would need to create an SslContextBuilderBuilder class to build 
the builder, possibly ad infinitum!

My question, then, is whether you would be accept a patch that changes the 
SslContextBuilder to be non-final, and makes the fields protected rather 
than private? That would allow me to extend it with getters, so that the 
user interface would be able to display the currently selected properties 
of the Builder.

On a related note, as mentioned above, I have been using SslContextBuilder 
to parameterize the SslContext that is later dynamically created based on 
the requested hostname. To do this, the last parameter I need to set before 
building the SslContext is actually the X509KeyManager. Of course, you 
cannot create an SslContextBuilder for a server without providing initial 
key material because there are no static .forServer() methods that do not 
require key material. Fortunately, the parameters are declared as 
non-final, so I can simply call .keyManager(...) a second time to overwrite 
the initial keyManager. It would, however, be slightly cleaner to be 
allowed to create the SslContextBuilder.forServer(), and then set the 
KeyManager or keying material separately, immediately before building.

Regards,

Rogan

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/b123e42c-58bc-4bc8-bd99-6c2e53d45983%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to