public class SSLEngineConfigurator extends java.lang.Object implements SSLEngineFactory
SSLEngine.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
clientMode
Client mode when handshaking.
|
protected java.lang.String[] |
enabledCipherSuites
The list of cipher suite
|
protected java.lang.String[] |
enabledProtocols
the list of protocols
|
protected boolean |
needClientAuth
Require client Authentication.
|
protected javax.net.ssl.SSLContext |
sslContext |
protected SSLContextConfigurator |
sslContextConfiguration |
protected boolean |
wantClientAuth
True when requesting authentication.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SSLEngineConfigurator() |
|
SSLEngineConfigurator(javax.net.ssl.SSLContext sslContext)
Create SSL Engine configuration basing on passed
SSLContext. |
|
SSLEngineConfigurator(javax.net.ssl.SSLContext sslContext,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
Create SSL Engine configuration basing on passed
SSLContext,
using passed client mode, need/want client auth parameters. |
|
SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration)
Create SSL Engine configuration basing on passed
SSLContextConfigurator. |
|
SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
Create SSL Engine configuration basing on passed
SSLContextConfigurator. |
|
SSLEngineConfigurator(SSLEngineConfigurator pattern) |
| Modifier and Type | Method and Description |
|---|---|
javax.net.ssl.SSLEngine |
configure(javax.net.ssl.SSLEngine sslEngine)
Configure passed
SSLEngine, using current configurator settings |
SSLEngineConfigurator |
copy() |
javax.net.ssl.SSLEngine |
createSSLEngine()
Create and configure
SSLEngine using this context configuration. |
javax.net.ssl.SSLEngine |
createSSLEngine(java.lang.String peerHost,
int peerPort)
Create and configure
SSLEngine using this context configuration
using advisory peer information. |
java.lang.String[] |
getEnabledCipherSuites() |
java.lang.String[] |
getEnabledProtocols() |
javax.net.ssl.SSLContext |
getSslContext() |
boolean |
isCipherConfigured() |
boolean |
isClientMode()
Will
SSLEngine be configured to work in client mode. |
boolean |
isNeedClientAuth() |
boolean |
isProtocolConfigured() |
boolean |
isWantClientAuth() |
SSLEngineConfigurator |
setCipherConfigured(boolean isCipherConfigured) |
SSLEngineConfigurator |
setClientMode(boolean clientMode)
Set
SSLEngine to be configured to work in client mode. |
SSLEngineConfigurator |
setEnabledCipherSuites(java.lang.String[] enabledCipherSuites)
Sets a list of enabled cipher suites.
|
SSLEngineConfigurator |
setEnabledProtocols(java.lang.String[] enabledProtocols)
Sets a list of enabled protocols.
|
SSLEngineConfigurator |
setNeedClientAuth(boolean needClientAuth) |
SSLEngineConfigurator |
setProtocolConfigured(boolean isProtocolConfigured) |
SSLEngineConfigurator |
setWantClientAuth(boolean wantClientAuth) |
java.lang.String |
toString() |
protected volatile SSLContextConfigurator sslContextConfiguration
protected volatile javax.net.ssl.SSLContext sslContext
protected java.lang.String[] enabledCipherSuites
protected java.lang.String[] enabledProtocols
protected boolean clientMode
protected boolean needClientAuth
protected boolean wantClientAuth
public SSLEngineConfigurator(javax.net.ssl.SSLContext sslContext)
SSLContext.sslContext - SSLContext.public SSLEngineConfigurator(javax.net.ssl.SSLContext sslContext,
boolean clientMode,
boolean needClientAuth,
boolean wantClientAuth)
SSLContext,
using passed client mode, need/want client auth parameters.sslContext - SSLContext.clientMode - needClientAuth - wantClientAuth - public SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration)
SSLContextConfigurator.
This constructor makes possible to initialize SSLEngine and SSLContext in lazy
fashion on first createSSLEngine() call.sslContextConfiguration - SSLContextConfigurator.public SSLEngineConfigurator(SSLContextConfigurator sslContextConfiguration, boolean clientMode, boolean needClientAuth, boolean wantClientAuth)
SSLContextConfigurator.
This constructor makes possible to initialize SSLEngine and SSLContext in lazy
fashion on first createSSLEngine() call.sslContextConfiguration - SSLContextConfigurator.clientMode - needClientAuth - wantClientAuth - public SSLEngineConfigurator(SSLEngineConfigurator pattern)
protected SSLEngineConfigurator()
public javax.net.ssl.SSLEngine createSSLEngine()
SSLEngine using this context configuration.SSLEngine.public javax.net.ssl.SSLEngine createSSLEngine(java.lang.String peerHost,
int peerPort)
SSLEngine using this context configuration
using advisory peer information.
Applications using this factory method are providing hints for an internal session reuse strategy.
Some cipher suites (such as Kerberos) require remote hostname information, in which case peerHost needs to be specified.
createSSLEngine in interface SSLEngineFactorypeerHost - the non-authoritative name of the hostpeerPort - the non-authoritative portSSLEngine.public javax.net.ssl.SSLEngine configure(javax.net.ssl.SSLEngine sslEngine)
SSLEngine, using current configurator settingssslEngine - SSLEngine to configure.SSLEngine.public boolean isClientMode()
SSLEngine be configured to work in client mode.SSLEngine will be configured to work
in client mode, or false for server mode.public SSLEngineConfigurator setClientMode(boolean clientMode)
SSLEngine to be configured to work in client mode.clientMode - true, if SSLEngine will be configured
to work in client mode, or false for server
mode.public boolean isNeedClientAuth()
public SSLEngineConfigurator setNeedClientAuth(boolean needClientAuth)
public boolean isWantClientAuth()
public SSLEngineConfigurator setWantClientAuth(boolean wantClientAuth)
public java.lang.String[] getEnabledCipherSuites()
public SSLEngineConfigurator setEnabledCipherSuites(java.lang.String[] enabledCipherSuites)
enabledCipherSuites - list of enabled cipher suitespublic java.lang.String[] getEnabledProtocols()
public SSLEngineConfigurator setEnabledProtocols(java.lang.String[] enabledProtocols)
enabledProtocols - list of enabled protocolspublic boolean isCipherConfigured()
public SSLEngineConfigurator setCipherConfigured(boolean isCipherConfigured)
public boolean isProtocolConfigured()
public SSLEngineConfigurator setProtocolConfigured(boolean isProtocolConfigured)
public javax.net.ssl.SSLContext getSslContext()
public java.lang.String toString()
toString in class java.lang.Objectpublic SSLEngineConfigurator copy()
Copyright © 2018 Oracle Corporation. All Rights Reserved.