public class DefaultSslContextFactory extends Object implements SslContextFactory
SslContextFactory
that creates and configures a Netty SslContext
using a
SslContextBuilder
.Constructor and Description |
---|
DefaultSslContextFactory(SslProvider sslProvider,
boolean sslSessionCacheEnabled) |
Modifier and Type | Method and Description |
---|---|
SslContextFactory |
applicationProtocols(List<String> applicationProtocols)
Set the application protocols to use when using ALPN.
|
SslContextFactory |
clientAuth(ClientAuth clientAuth)
Configures the client auth
|
SslContext |
create() |
SslContextFactory |
enabledCipherSuites(Set<String> enabledCipherSuites)
Set the enabled cipher suites.
|
SslContextFactory |
forClient(boolean forClient)
Set whether to build a context for clients or for servers
|
SslContextFactory |
keyMananagerFactory(KeyManagerFactory kmf)
Set the key manager factory to use.
|
SslContextFactory |
trustManagerFactory(TrustManagerFactory tmf)
Set the trust manager factory to use.
|
SslContextFactory |
useAlpn(boolean useAlpn)
Set whether to use ALPN.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serverName
public DefaultSslContextFactory(SslProvider sslProvider, boolean sslSessionCacheEnabled)
public SslContextFactory useAlpn(boolean useAlpn)
SslContextFactory
useAlpn
in interface SslContextFactory
useAlpn
- true
to use ALPNpublic SslContextFactory clientAuth(ClientAuth clientAuth)
SslContextFactory
clientAuth
in interface SslContextFactory
clientAuth
- the client auth to usepublic SslContextFactory forClient(boolean forClient)
SslContextFactory
forClient
in interface SslContextFactory
forClient
- true
for client otherwise for serverspublic SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)
SslContextFactory
keyMananagerFactory
in interface SslContextFactory
kmf
- the key manager factory instancepublic SslContextFactory trustManagerFactory(TrustManagerFactory tmf)
SslContextFactory
trustManagerFactory
in interface SslContextFactory
tmf
- the trust manager factory instancepublic SslContext create() throws SSLException
create
in interface SslContextFactory
SslContext
SSLException
public SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)
SslContextFactory
enabledCipherSuites
in interface SslContextFactory
enabledCipherSuites
- the set of cipher suitespublic SslContextFactory applicationProtocols(List<String> applicationProtocols)
SslContextFactory
applicationProtocols
in interface SslContextFactory
applicationProtocols
- this list of application protocolsCopyright © 2024 Eclipse. All rights reserved.