Package io.vertx.core.net
Class KeyStoreOptionsBase
- java.lang.Object
- 
- io.vertx.core.net.KeyStoreOptionsBase
 
- 
- All Implemented Interfaces:
- KeyCertOptions,- TrustOptions
 - Direct Known Subclasses:
- JksOptions,- KeyStoreOptions,- PfxOptions
 
 public abstract class KeyStoreOptionsBase extends Object implements KeyCertOptions, TrustOptions Base class ofKeyStorebased options.- Author:
- Julien Viet, Tim Fox
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedKeyStoreOptionsBase()Default constructorprotectedKeyStoreOptionsBase(KeyStoreOptionsBase other)Copy constructor
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract KeyStoreOptionsBasecopy()booleanequals(Object obj)StringgetAlias()StringgetAliasPassword()io.vertx.core.net.impl.KeyStoreHelpergetHelper(Vertx vertx)KeyManagerFactorygetKeyManagerFactory(Vertx vertx)Create and return the key manager factory for these options.StringgetPassword()StringgetPath()Get the path to the ksy storeprotected StringgetProvider()TrustManagerFactorygetTrustManagerFactory(Vertx vertx)Create and return the trust manager factory for these options.protected StringgetType()BuffergetValue()Get the key store as a bufferinthashCode()Function<String,KeyManagerFactory>keyManagerFactoryMapper(Vertx vertx)Returns a function that maps SNI server names toKeyManagerFactoryinstance.KeyStoreloadKeyStore(Vertx vertx)Load and return a Java keystore.KeyStoreOptionsBasesetAlias(String alias)Set the alias for a server certificate when the keystore has more than one.KeyStoreOptionsBasesetAliasPassword(String aliasPassword)Set the password for the server certificate designated bygetAlias().KeyStoreOptionsBasesetPassword(String password)Set the password for the key storeKeyStoreOptionsBasesetPath(String path)Set the path to the key storeprotected KeyStoreOptionsBasesetProvider(String provider)protected KeyStoreOptionsBasesetType(String type)KeyStoreOptionsBasesetValue(Buffer value)Set the key store as a bufferFunction<String,TrustManager[]>trustManagerMapper(Vertx vertx)Returns a function that maps SNI server names to aTrustManagerFactoryinstance.
 
- 
- 
- 
Constructor Detail- 
KeyStoreOptionsBaseprotected KeyStoreOptionsBase() Default constructor
 - 
KeyStoreOptionsBaseprotected KeyStoreOptionsBase(KeyStoreOptionsBase other) Copy constructor- Parameters:
- other- the options to copy
 
 
- 
 - 
Method Detail- 
getTypeprotected String getType() 
 - 
setTypeprotected KeyStoreOptionsBase setType(String type) 
 - 
getProviderprotected String getProvider() 
 - 
setProviderprotected KeyStoreOptionsBase setProvider(String provider) 
 - 
getPasswordpublic String getPassword() - Returns:
- the password for the key store
 
 - 
setPasswordpublic KeyStoreOptionsBase setPassword(String password) Set the password for the key store- Parameters:
- password- the password
- Returns:
- a reference to this, so the API can be used fluently
 
 - 
getPathpublic String getPath() Get the path to the ksy store- Returns:
- the path
 
 - 
setPathpublic KeyStoreOptionsBase setPath(String path) Set the path to the key store- Parameters:
- path- the path
- Returns:
- a reference to this, so the API can be used fluently
 
 - 
getValuepublic Buffer getValue() Get the key store as a buffer- Returns:
- the key store as a buffer
 
 - 
setValuepublic KeyStoreOptionsBase setValue(Buffer value) Set the key store as a buffer- Parameters:
- value- the key store as a buffer
- Returns:
- a reference to this, so the API can be used fluently
 
 - 
getAliaspublic String getAlias() - Returns:
- the alias for a server certificate when the keystore has more than one, or null
 
 - 
setAliaspublic KeyStoreOptionsBase setAlias(String alias) Set the alias for a server certificate when the keystore has more than one.- Returns:
- a reference to this, so the API can be used fluently
 
 - 
getAliasPasswordpublic String getAliasPassword() - Returns:
- the password for the server certificate designated by getAlias(), ornull
 
 - 
setAliasPasswordpublic KeyStoreOptionsBase setAliasPassword(String aliasPassword) Set the password for the server certificate designated bygetAlias().- Returns:
- a reference to this, so the API can be used fluently
 
 - 
getHelperpublic io.vertx.core.net.impl.KeyStoreHelper getHelper(Vertx vertx) throws Exception - Throws:
- Exception
 
 - 
loadKeyStorepublic KeyStore loadKeyStore(Vertx vertx) throws Exception Load and return a Java keystore.- Parameters:
- vertx- the vertx instance
- Returns:
- the KeyStore
- Throws:
- Exception
 
 - 
getKeyManagerFactorypublic KeyManagerFactory getKeyManagerFactory(Vertx vertx) throws Exception Description copied from interface:KeyCertOptionsCreate and return the key manager factory for these options.The returned key manager factory should be already initialized and ready to use. - Specified by:
- getKeyManagerFactoryin interface- KeyCertOptions
- Parameters:
- vertx- the vertx instance
- Returns:
- the key manager factory
- Throws:
- Exception
 
 - 
keyManagerFactoryMapperpublic Function<String,KeyManagerFactory> keyManagerFactoryMapper(Vertx vertx) throws Exception Description copied from interface:KeyCertOptionsReturns a function that maps SNI server names toKeyManagerFactoryinstance. The returnedKeyManagerFactorymust satisfies these rules:- The store private key must match the indicated server name for a null alias.
- The store certificate chain must match the indicated server name for a null alias.
 The returned function may return nullin which case the default key manager provided byKeyCertOptions.getKeyManagerFactory(Vertx)will be used.- Specified by:
- keyManagerFactoryMapperin interface- KeyCertOptions
- Throws:
- Exception
 
 - 
getTrustManagerFactorypublic TrustManagerFactory getTrustManagerFactory(Vertx vertx) throws Exception Description copied from interface:TrustOptionsCreate and return the trust manager factory for these options.The returned trust manager factory should be already initialized and ready to use. - Specified by:
- getTrustManagerFactoryin interface- TrustOptions
- Parameters:
- vertx- the vertx instance
- Returns:
- the trust manager factory
- Throws:
- Exception
 
 - 
trustManagerMapperpublic Function<String,TrustManager[]> trustManagerMapper(Vertx vertx) throws Exception Description copied from interface:TrustOptionsReturns a function that maps SNI server names to aTrustManagerFactoryinstance. The returnedTrustManagerFactorymust already be initialized and ready to use. The mapper is only used when the server has SNI enabled and the client indicated a server name. The returned function may returnnullin which caseTrustOptions.getTrustManagerFactory(Vertx)is used as fallback.- Specified by:
- trustManagerMapperin interface- TrustOptions
- Parameters:
- vertx- the vertx instance
- Returns:
- the trustManager
- Throws:
- Exception
 
 - 
copypublic abstract KeyStoreOptionsBase copy() - Specified by:
- copyin interface- KeyCertOptions
- Specified by:
- copyin interface- TrustOptions
- Returns:
- a copy of these options
 
 
- 
 
-