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 ofCredentialStorefrom supplied information. It initializes the instance.- Author:
- Peter Skopek
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,String>attributesprivate org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException>credentialSourceprivate org.wildfly.client.config.XMLLocationlocationprivate Stringnameprivate StringproviderNameprivate Supplier<Provider[]>providersprivate Stringtype
-
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 CredentialStoreget()Create an instance ofCredentialStoreand initialize it.StringgetName()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 nonnullname of theCredentialStoretype- the possiblynulltype of theCredentialStoreattributes- the nonnullattributes to initialise theCredentialStoreproviderName- the possiblynullname of the provider to uselocation- the nonnullcurrent parse locationsupplier- the possiblynullcredential source to unlock the storeproviders- the possiblynullsupplier 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 ofCredentialStoreand initialize it.- Specified by:
getin 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
-
-