public class SslConfiguration extends Object implements Toggleable
| Modifier and Type | Class and Description | 
|---|---|
| static class  | SslConfiguration.KeyConfigurationConfiguration properties for SSL key. | 
| static class  | SslConfiguration.KeyStoreConfigurationConfiguration properties for SSL key store. | 
| static class  | SslConfiguration.TrustStoreConfigurationConfiguration properties for SSL trust store. | 
| Modifier and Type | Field and Description | 
|---|---|
| static boolean | DEFAULT_BUILDSELFSIGNEDThe default build self signed value. | 
| static boolean | DEFAULT_ENABLEDThe default enable value. | 
| static int | DEFAULT_PORTThe default port value. | 
| static String | DEFAULT_PROTOCOLThe default protocol. | 
| static String | PREFIXThe prefix used to resolve this configuration. | 
| Constructor and Description | 
|---|
| SslConfiguration() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | buildSelfSigned() | 
| Optional<String[]> | getCiphers() | 
| Optional<ClientAuthentication> | getClientAuthentication() | 
| SslConfiguration.KeyConfiguration | getKey() | 
| SslConfiguration.KeyStoreConfiguration | getKeyStore() | 
| int | getPort() | 
| Optional<String> | getProtocol() | 
| Optional<String[]> | getProtocols() | 
| SslConfiguration.TrustStoreConfiguration | getTrustStore() | 
| boolean | isEnabled() | 
| protected void | readExisting(SslConfiguration defaultSslConfiguration,
            SslConfiguration.KeyConfiguration defaultKeyConfiguration,
            SslConfiguration.KeyStoreConfiguration defaultKeyStoreConfiguration,
            SslConfiguration.TrustStoreConfiguration defaultTrustStoreConfiguration)Reads an existing config. | 
| void | setBuildSelfSigned(boolean buildSelfSigned)Sets whether to build a self signed certificate. | 
| void | setCiphers(String[] ciphers)Sets the ciphers to use. | 
| void | setClientAuthentication(ClientAuthentication clientAuthentication)Sets the client authentication mode. | 
| void | setEnabled(boolean enabled)Whether SSL is enabled. | 
| void | setKey(SslConfiguration.KeyConfiguration key)Sets the key configuration. | 
| void | setKeyStore(SslConfiguration.KeyStoreConfiguration keyStore)Sets the keystore configuration. | 
| void | setPort(int port)Sets the SSL port. | 
| void | setProtocol(String protocol)Sets the protocol to use. | 
| void | setProtocols(String[] protocols)Sets the protocols to use. | 
| void | setTrustStore(SslConfiguration.TrustStoreConfiguration trustStore)Sets the trust store configuration. | 
public static final String PREFIX
public static final boolean DEFAULT_ENABLED
public static final int DEFAULT_PORT
public static final boolean DEFAULT_BUILDSELFSIGNED
public static final String DEFAULT_PROTOCOL
public boolean isEnabled()
isEnabled in interface Toggleablepublic void setEnabled(boolean enabled)
enabled - True if SSL is enabledpublic int getPort()
public boolean buildSelfSigned()
public Optional<ClientAuthentication> getClientAuthentication()
public SslConfiguration.KeyConfiguration getKey()
public SslConfiguration.KeyStoreConfiguration getKeyStore()
public SslConfiguration.TrustStoreConfiguration getTrustStore()
public void setPort(int port)
port - The portpublic void setBuildSelfSigned(boolean buildSelfSigned)
buildSelfSigned - True if a certificate should be builtpublic void setKey(SslConfiguration.KeyConfiguration key)
key - The key configurationpublic void setKeyStore(SslConfiguration.KeyStoreConfiguration keyStore)
keyStore - The keystore configurationpublic void setTrustStore(SslConfiguration.TrustStoreConfiguration trustStore)
trustStore - The trust store.public void setClientAuthentication(ClientAuthentication clientAuthentication)
clientAuthentication - The client authentication modepublic void setCiphers(String[] ciphers)
ciphers - The cipherspublic void setProtocols(String[] protocols)
protocols - The protocolspublic void setProtocol(String protocol)
protocol - The protocolprotected final void readExisting(SslConfiguration defaultSslConfiguration, SslConfiguration.KeyConfiguration defaultKeyConfiguration, SslConfiguration.KeyStoreConfiguration defaultKeyStoreConfiguration, SslConfiguration.TrustStoreConfiguration defaultTrustStoreConfiguration)
defaultSslConfiguration - The default SSL configdefaultKeyConfiguration - The default key configdefaultKeyStoreConfiguration - The default keystore configdefaultTrustStoreConfiguration - The Default truststore config