Class KeyStoreFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean
org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean,org.springframework.beans.factory.InitializingBean
public class KeyStoreFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean
Spring
FactoryBean implementation
which makes it possible to configure KeyStore instances
using Spring.-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectCreates a newKeyStore.voidSets the file which contains the key store.voidsetPassword(String password) Sets the key store password.voidsetProvider(String provider) Sets the name of the provider to use when creating the key store.voidsetResource(org.springframework.core.io.Resource resource) Sets a SpringResourcewhich contains the key store.voidSets the type of key store to create.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
KeyStoreFactoryBean
public KeyStoreFactoryBean()
-
-
Method Details
-
createInstance
Creates a newKeyStore. This method will be called by the base class when Spring creates a bean using this FactoryBean. -
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean
-
setFile
Sets the file which contains the key store. Either this property orsetProvider(String)have to be set.- Parameters:
file- the file to load the key store from.
-
setPassword
Sets the key store password. If this value isnullno password will be used to check the integrity of the key store.- Parameters:
password- the password ornullif no password is needed.
-
setProvider
Sets the name of the provider to use when creating the key store. The default is to use the platform default provider.- Parameters:
provider- the name of the provider, e.g. SUN.
-
setResource
public void setResource(org.springframework.core.io.Resource resource) Sets a SpringResourcewhich contains the key store. Either this property orsetFile(File)have to be set.- Parameters:
resource- the resource to load the key store from.
-
setType
Sets the type of key store to create. The default is to create a JKS key store.- Parameters:
type- the type to use when creating the key store.- Throws:
IllegalArgumentException- if the specified value isnull.
-