Package org.wildfly.security.sasl.util
Class FilterMechanismSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
-
- org.wildfly.security.sasl.util.FilterMechanismSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class FilterMechanismSaslServerFactory extends AbstractDelegatingSaslServerFactory
ASaslServerFactory
which filters available mechanisms (either inclusively or exclusively) from a delegateSaslServerFactory
.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description FilterMechanismSaslServerFactory(SaslServerFactory delegate, boolean include, String... mechanisms)
Construct a new instance.FilterMechanismSaslServerFactory(SaslServerFactory delegate, boolean include, Collection<String> mechanisms)
Construct a new instance.FilterMechanismSaslServerFactory(SaslServerFactory delegate, Predicate<String> predicate)
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)
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegatesThrough, toString
-
-
-
-
Constructor Detail
-
FilterMechanismSaslServerFactory
public FilterMechanismSaslServerFactory(SaslServerFactory delegate, Predicate<String> predicate)
Construct a new instance.- Parameters:
delegate
- the factory to delegate topredicate
- the mechanism name predicate
-
FilterMechanismSaslServerFactory
public FilterMechanismSaslServerFactory(SaslServerFactory delegate, boolean include, String... mechanisms)
Construct a new instance.- Parameters:
delegate
- the factory to delegate toinclude
-true
to only include the given mechanisms,false
to exclude themmechanisms
- the mechanisms to include or exclude
-
FilterMechanismSaslServerFactory
public FilterMechanismSaslServerFactory(SaslServerFactory delegate, boolean include, Collection<String> mechanisms)
Construct a new instance.- Parameters:
delegate
- the factory to delegate toinclude
-true
to only include the given mechanisms,false
to exclude themmechanisms
- the mechanisms to include or exclude
-
-
Method Detail
-
createSaslServer
public SaslServer createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslServer
in interfaceSaslServerFactory
- Overrides:
createSaslServer
in classAbstractDelegatingSaslServerFactory
- Throws:
SaslException
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> props)
- Specified by:
getMechanismNames
in interfaceSaslServerFactory
- Overrides:
getMechanismNames
in classAbstractDelegatingSaslServerFactory
-
-