Package org.wildfly.security.auth.client
Class CredentialStoreFactory
- java.lang.Object
-
- org.wildfly.security.auth.client.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 ofCredentialStore
from supplied information. It initializes the instance.- Author:
- Peter Skopek
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,String>
attributes
private org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException>
credentialSource
private org.wildfly.client.config.XMLLocation
location
private String
name
private String
providerName
private Supplier<Provider[]>
providers
private String
type
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialStore
get()
Create an instance ofCredentialStore
and initialize it.String
getName()
Get name ofCredentialStore
-
-
-
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 nonnull
name of theCredentialStore
type
- the possiblynull
type of theCredentialStore
attributes
- the nonnull
attributes to initialise theCredentialStore
providerName
- the possiblynull
name of the provider to uselocation
- the nonnull
current parse locationsupplier
- the possiblynull
credential source to unlock the storeproviders
- the possiblynull
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 ofCredentialStore
and initialize it.- Specified by:
get
in interfaceorg.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>
- Returns:
- the new instance
- Throws:
GeneralSecurityException
- if instantiation fails for some reasonorg.wildfly.client.config.ConfigXMLParseException
-
getName
public String getName()
Get name ofCredentialStore
- Returns:
- name
-
-