public class SSLConfiguration extends Object
SSLConfiguration
represents a configuration of SSL.Constructor and Description |
---|
SSLConfiguration(KeyStoreInfo keyStoreInfo,
KeyStoreInfo trustKeyStoreInfo) |
SSLConfiguration(KeyStoreInfo keyStoreInfo,
KeyStoreInfo trustKeyStoreInfo,
boolean clientAuth) |
Modifier and Type | Method and Description |
---|---|
KeyStoreInfo |
getKeyStoreInfo()
Returns the keyStoreInfo.
|
SSLServerSocketFactory |
getSSLServerSocketFactory() |
SSLSocketFactory |
getSSLSocketFactory() |
KeyStoreInfo |
getTrustKeyStoreInfo() |
boolean |
isNeedClientAuth()
Returns the needClientAuth.
|
static SSLConfiguration |
load(String filePath) |
static SSLConfiguration |
loadClassPath(String filePath) |
static SSLConfiguration |
parse(String configuration)
Creates a
SSLConfiguration instance with a string.The string should format as: |
void |
setKeyStoreInfo(KeyStoreInfo keyStoreInfo) |
void |
setNeedClientAuth(boolean needClientAuth) |
void |
setTrustKeyStoreInfo(KeyStoreInfo trustKeyStoreInfo) |
public SSLConfiguration(KeyStoreInfo keyStoreInfo, KeyStoreInfo trustKeyStoreInfo)
public SSLConfiguration(KeyStoreInfo keyStoreInfo, KeyStoreInfo trustKeyStoreInfo, boolean clientAuth)
public static SSLConfiguration parse(String configuration)
SSLConfiguration
instance with a string.configuration
- configuration as a string.SSLConfiguration
.public static SSLConfiguration load(String filePath) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public static SSLConfiguration loadClassPath(String filePath) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public SSLSocketFactory getSSLSocketFactory() throws SSLConfigurationException
SSLConfigurationException
public SSLServerSocketFactory getSSLServerSocketFactory() throws SSLConfigurationException
SSLConfigurationException
public KeyStoreInfo getKeyStoreInfo()
public void setKeyStoreInfo(KeyStoreInfo keyStoreInfo)
keyStoreInfo
- the keyStoreInfo to setpublic KeyStoreInfo getTrustKeyStoreInfo()
public void setTrustKeyStoreInfo(KeyStoreInfo trustKeyStoreInfo)
trustKeyStoreInfo
- the trustKeyStoreInfo to setpublic boolean isNeedClientAuth()
public void setNeedClientAuth(boolean needClientAuth)
needClientAuth
- the needClientAuth to setCopyright © 2015. All rights reserved.