Class KeyStoreFactoryBean

java.lang.Object
org.cryptacular.bean.KeyStoreFactoryBean
All Implemented Interfaces:
FactoryBean<KeyStore>

public class KeyStoreFactoryBean extends Object implements FactoryBean<KeyStore>
Factory bean that produces a KeyStore from a file or URI.
Author:
Middleware Services
  • Field Details

  • Constructor Details

    • KeyStoreFactoryBean

      public KeyStoreFactoryBean(Resource resource, String password)
      Creates a new keystore factory bean.
      Parameters:
      resource - Resource containing encoded keystore data.
      password - Password used to decrypt key entry in keystore.
    • KeyStoreFactoryBean

      public KeyStoreFactoryBean(Resource resource, String type, String password)
      Creates a new keystore factory bean.
      Parameters:
      resource - Resource containing encoded keystore data.
      type - Keystore type, e.g. JCEKS.
      password - Password used to decrypt key entry in keystore.
  • Method Details

    • getType

      public String getType()
      Returns:
      Keystore type.
    • getResource

      public Resource getResource()
      Returns:
      Resource that provides encoded keystore data.
    • newInstance

      public KeyStore newInstance()
      Specified by:
      newInstance in interface FactoryBean<KeyStore>
      Returns:
      New instance of the type handled by this factory.