Package org.wildfly.security.sasl.util
Class ServiceLoaderSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.ServiceLoaderSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class ServiceLoaderSaslServerFactory extends Object implements SaslServerFactory
ASaslServerFactory
which uses aServiceLoader
to find implementations.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private ServiceLoader<SaslServerFactory>
loader
-
Constructor Summary
Constructors Constructor Description ServiceLoaderSaslServerFactory(ClassLoader classLoader)
Construct a new instance.ServiceLoaderSaslServerFactory(ServiceLoader<SaslServerFactory> loader)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslServer
createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
String[]
getMechanismNames(Map<String,?> props)
-
-
-
Field Detail
-
loader
private final ServiceLoader<SaslServerFactory> loader
-
-
Constructor Detail
-
ServiceLoaderSaslServerFactory
public ServiceLoaderSaslServerFactory(ServiceLoader<SaslServerFactory> loader)
Construct a new instance.- Parameters:
loader
- the service loader to use
-
ServiceLoaderSaslServerFactory
public ServiceLoaderSaslServerFactory(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
-
createSaslServer
public SaslServer createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslServer
in interfaceSaslServerFactory
- Throws:
SaslException
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> props)
- Specified by:
getMechanismNames
in interfaceSaslServerFactory
-
-