public final class SSLContextBuilder extends Object implements Builder<SSLContext>
| Modifier and Type | Method and Description |
|---|---|
SSLContext |
build()
Create new
{@link SSLContext} instance with configured settings. |
static SSLContext |
create(Config sslConfig)
Creates
SSLContext from the provided configuration. |
static SSLContextBuilder |
create(KeyConfig privateKeyConfig)
Creates a builder of the
SSLContext. |
SSLContextBuilder |
sessionCacheSize(long sessionCacheSize)
Set the size of the cache used for storing SSL session objects.
|
SSLContextBuilder |
sessionTimeout(long sessionTimeout)
Set the timeout for the cached SSL session objects, in seconds.
|
SSLContextBuilder |
trustConfig(KeyConfig trustConfig)
Set the trust key configuration to be used to validate certificates.
|
public static SSLContextBuilder create(KeyConfig privateKeyConfig)
SSLContext.privateKeyConfig - the required private key configuration parameterpublic static SSLContext create(Config sslConfig)
SSLContext from the provided configuration.sslConfig - the ssl configurationSSLContextIllegalStateException - in case of a problem; will wrap either an instance of IOException or
a GeneralSecurityExceptionpublic SSLContextBuilder trustConfig(KeyConfig trustConfig)
trustConfig - the trust configurationpublic SSLContextBuilder sessionCacheSize(long sessionCacheSize)
0 to use the
default value.sessionCacheSize - the session cache sizepublic SSLContextBuilder sessionTimeout(long sessionTimeout)
0 to use the
default value.sessionTimeout - the session timeoutpublic SSLContext build()
{@link SSLContext} instance with configured settings.build in interface Builder<SSLContext>IllegalStateException - in case of a problem; will wrap either an instance of IOException or
a GeneralSecurityExceptionCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.