Package org.wildfly.security.sasl.util
Class ServiceLoaderSaslClientFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.ServiceLoaderSaslClientFactory
-
- All Implemented Interfaces:
SaslClientFactory
public final class ServiceLoaderSaslClientFactory extends Object implements SaslClientFactory
ASaslClientFactory
which uses aServiceLoader
to find implementations.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description ServiceLoaderSaslClientFactory(ClassLoader classLoader)
Construct a new instance.ServiceLoaderSaslClientFactory(ServiceLoader<SaslClientFactory> loader)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslClient
createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
String[]
getMechanismNames(Map<String,?> props)
-
-
-
Constructor Detail
-
ServiceLoaderSaslClientFactory
public ServiceLoaderSaslClientFactory(ServiceLoader<SaslClientFactory> loader)
Construct a new instance.- Parameters:
loader
- the service loader to use
-
ServiceLoaderSaslClientFactory
public ServiceLoaderSaslClientFactory(ClassLoader classLoader)
Construct a new instance.- Parameters:
classLoader
- the class loader to use as the basis of the provider search, ornull
to use the system or bootstrap class loader
-
-
Method Detail
-
createSaslClient
public SaslClient createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslClient
in interfaceSaslClientFactory
- Throws:
SaslException
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> props)
- Specified by:
getMechanismNames
in interfaceSaslClientFactory
-
-