public class SecureClientDriverFactory extends Object
ClientDriver object which supports SSL. To
arrange that a key store has to be provided. The required password has to be
the password of the certificate's private key as well as of the key store.
This is usually the case if the certificate is exported via OpenSSL e.g. as
PKCS#12 format.
An example to create a certificate with keytool provided in the JDK:
$ keytool -genkey -keyalg RSA -dname "cn=SecureClientDriver" \
-alias certificate -keystore keystore.jks -keypass password \
-storepass password -validity 360 -keysize 2048
| Constructor and Description |
|---|
SecureClientDriverFactory() |
| Modifier and Type | Method and Description |
|---|---|
SecureClientDriver |
build()
Create SecureClientDriver with the given configuration.
|
SecureClientDriverFactory |
certAlias(String certAlias)
Sets the certificate alias.
|
SecureClientDriver |
createClientDriver(int port,
KeyStore keyStore,
String password,
String certAlias)
Factory method to create and start a ClientDriver on a specific port.
|
SecureClientDriver |
createClientDriver(KeyStore keyStore,
String password,
String certAlias)
Factory method to create and start ClientDriver.
|
SecureClientDriverFactory |
keyStore(KeyStore keyStore)
Sets the key store.
|
SecureClientDriverFactory |
password(String password)
Sets the password.
|
SecureClientDriverFactory |
port(int port)
Sets the port.
|
public SecureClientDriver createClientDriver(KeyStore keyStore, String password, String certAlias)
keyStore - The KeyStore that contains the necessary certificate.password - The password for the certificate private key and the container.certAlias - the alias of the certificate in the key storepublic SecureClientDriver createClientDriver(int port, KeyStore keyStore, String password, String certAlias)
port - The port that should be used.keyStore - The KeyStore that contains the necessary certificate.password - The password for the certificate private key and the container.certAlias - the alias of the certificate in the key storepublic SecureClientDriverFactory port(int port)
port - the portpublic SecureClientDriverFactory password(String password)
password - the certificate's passwordpublic SecureClientDriverFactory certAlias(String certAlias)
certAlias - the certificate aliaspublic SecureClientDriverFactory keyStore(KeyStore keyStore)
keyStore - the key storepublic SecureClientDriver build()
Copyright © 2016. All Rights Reserved.