Class CredentialStoreFactory

  • All Implemented Interfaces:
    org.wildfly.common.function.ExceptionSupplier<CredentialStore,​org.wildfly.client.config.ConfigXMLParseException>

    final class CredentialStoreFactory
    extends Object
    implements org.wildfly.common.function.ExceptionSupplier<CredentialStore,​org.wildfly.client.config.ConfigXMLParseException>
    Factory which can create instance of CredentialStore from supplied information. It initializes the instance.
    Author:
    Peter Skopek
    • Field Detail

      • name

        private final String name
      • type

        private final String type
      • location

        private final org.wildfly.client.config.XMLLocation location
      • credentialSource

        private final org.wildfly.common.function.ExceptionSupplier<CredentialSource,​org.wildfly.client.config.ConfigXMLParseException> credentialSource
      • providerName

        private final String providerName
    • Constructor Detail

      • CredentialStoreFactory

        CredentialStoreFactory​(String name,
                               String type,
                               Map<String,​String> attributes,
                               String providerName,
                               org.wildfly.client.config.XMLLocation location,
                               org.wildfly.common.function.ExceptionSupplier<CredentialSource,​org.wildfly.client.config.ConfigXMLParseException> supplier,
                               Supplier<Provider[]> providers)
        Creates a factory using parameters.
        Parameters:
        name - the non null name of the CredentialStore
        type - the possibly null type of the CredentialStore
        attributes - the non null attributes to initialise the CredentialStore
        providerName - the possibly null name of the provider to use
        location - the non null current parse location
        supplier - the possibly null credential source to unlock the store
        providers - the possibly null supplier of provider instances to search and use to create the store
    • Method Detail

      • get

        public CredentialStore get()
                            throws org.wildfly.client.config.ConfigXMLParseException
        Create an instance of CredentialStore and initialize it.
        Specified by:
        get in interface org.wildfly.common.function.ExceptionSupplier<CredentialStore,​org.wildfly.client.config.ConfigXMLParseException>
        Returns:
        the new instance
        Throws:
        GeneralSecurityException - if instantiation fails for some reason
        org.wildfly.client.config.ConfigXMLParseException