KeyManagerFactorySpi (Java SE 9 & JDK 9 ) (original) (raw)
- javax.net.ssl.KeyManagerFactorySpi
public abstract class KeyManagerFactorySpi
extends Object
This class defines the Service Provider Interface (SPI) for the KeyManagerFactory
class.
All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a particular key manager factory.
Since:
1.4
See Also:
KeyManagerFactory, KeyManager
Constructor Summary
Constructors
Constructor Description KeyManagerFactorySpi() Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method Description protected abstract KeyManager[] engineGetKeyManagers() Returns one key manager for each type of key material. protected abstract void engineInit(KeyStore ks, char[] password) Initializes this factory with a source of key material. protected abstract void engineInit(ManagerFactoryParameters spec) Initializes this factory with a source of key material. * ### Methods inherited from class java.lang.[Object](../../../java/lang/Object.html "class in java.lang") `[clone](../../../java/lang/Object.html#clone--), [equals](../../../java/lang/Object.html#equals-java.lang.Object-), [finalize](../../../java/lang/Object.html#finalize--), [getClass](../../../java/lang/Object.html#getClass--), [hashCode](../../../java/lang/Object.html#hashCode--), [notify](../../../java/lang/Object.html#notify--), [notifyAll](../../../java/lang/Object.html#notifyAll--), [toString](../../../java/lang/Object.html#toString--), [wait](../../../java/lang/Object.html#wait--), [wait](../../../java/lang/Object.html#wait-long-), [wait](../../../java/lang/Object.html#wait-long-int-)`
Constructor Detail
* #### KeyManagerFactorySpi public KeyManagerFactorySpi()
Method Detail
* #### engineInit protected abstract void engineInit([KeyStore](../../../java/security/KeyStore.html "class in java.security") ks, char[] password) throws [KeyStoreException](../../../java/security/KeyStoreException.html "class in java.security"), [NoSuchAlgorithmException](../../../java/security/NoSuchAlgorithmException.html "class in java.security"), [UnrecoverableKeyException](../../../java/security/UnrecoverableKeyException.html "class in java.security") Initializes this factory with a source of key material. Parameters: `ks` \- the key store or null `password` \- the password for recovering keys Throws: `[KeyStoreException](../../../java/security/KeyStoreException.html "class in java.security")` \- if this operation fails `[NoSuchAlgorithmException](../../../java/security/NoSuchAlgorithmException.html "class in java.security")` \- if the specified algorithm is not available from the specified provider. `[UnrecoverableKeyException](../../../java/security/UnrecoverableKeyException.html "class in java.security")` \- if the key cannot be recovered See Also: [KeyManagerFactory.init(KeyStore, char\[\])](../../../javax/net/ssl/KeyManagerFactory.html#init-java.security.KeyStore-char:A-) * #### engineInit protected abstract void engineInit([ManagerFactoryParameters](../../../javax/net/ssl/ManagerFactoryParameters.html "interface in javax.net.ssl") spec) throws [InvalidAlgorithmParameterException](../../../java/security/InvalidAlgorithmParameterException.html "class in java.security") Initializes this factory with a source of key material. In some cases, initialization parameters other than a keystore and password may be needed by a provider. Users of that particular provider are expected to pass an implementation of the appropriate `ManagerFactoryParameters` as defined by the provider. The provider can then call the specified methods in the ManagerFactoryParameters implementation to obtain the needed information. Parameters: `spec` \- an implementation of a provider-specific parameter specification Throws: `[InvalidAlgorithmParameterException](../../../java/security/InvalidAlgorithmParameterException.html "class in java.security")` \- if there is problem with the parameters See Also: [KeyManagerFactory.init(ManagerFactoryParameters spec)](../../../javax/net/ssl/KeyManagerFactory.html#init-javax.net.ssl.ManagerFactoryParameters-) * #### engineGetKeyManagers protected abstract [KeyManager](../../../javax/net/ssl/KeyManager.html "interface in javax.net.ssl")[] engineGetKeyManagers() Returns one key manager for each type of key material. Returns: the key managers Throws: `[IllegalStateException](../../../java/lang/IllegalStateException.html "class in java.lang")` \- if the KeyManagerFactorySpi is not initialized
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.