Package org.wildfly.security.sasl
Class SaslMechanismSelector
- java.lang.Object
-
- org.wildfly.security.sasl.SaslMechanismSelector
-
public abstract class SaslMechanismSelector extends Object
A selection specification for SASL client or server mechanisms. The specification can be used to define the types, behavior, and order of SASL mechanisms.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static SaslMechanismSelectorALLstatic SaslMechanismSelectorDEFAULTstatic SaslMechanismSelectorNONE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslMechanismSelectoraddAllRemaining()SaslMechanismSelectoraddMatching(SaslMechanismPredicate predicate)SaslMechanismSelectoraddMechanism(String mechName)SaslMechanismSelectoraddMechanisms(String... mechNames)List<String>apply(Collection<String> mechNames, SSLSession sslSession)Get a list of mechanism names which are matched by this selector in the preferential order that the selector specifies.Supplier<String>createMechanismSupplier(String[] mechNames)Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies.Supplier<String>createMechanismSupplier(String[] mechNames, SSLSession sslSession)Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies.Supplier<String>createMechanismSupplier(Collection<String> mechNames)Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies.Supplier<String>createMechanismSupplier(Collection<String> mechNames, SSLSession sslSession)Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies.booleanequals(Object obj)booleanequals(SaslMechanismSelector selector)SaslMechanismSelectorforbidMatching(SaslMechanismPredicate predicate)SaslMechanismSelectorforbidMechanism(String mechName)SaslMechanismSelectorforbidMechanisms(String... mechNames)static SaslMechanismSelectorfromString(String string)inthashCode()StringtoString()
-
-
-
Field Detail
-
NONE
public static final SaslMechanismSelector NONE
-
ALL
public static final SaslMechanismSelector ALL
-
DEFAULT
public static final SaslMechanismSelector DEFAULT
-
-
Method Detail
-
createMechanismSupplier
public Supplier<String> createMechanismSupplier(String[] mechNames)
Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies. When no preference between two mechanisms is specified, the original order is used.- Parameters:
mechNames- the mechanism names (must not benull)- Returns:
- the supplier of mechanisms (not
null)
-
createMechanismSupplier
public Supplier<String> createMechanismSupplier(String[] mechNames, SSLSession sslSession)
Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies. When no preference between two mechanisms is specified, the original order is used.- Parameters:
mechNames- the mechanism names (must not benull)sslSession- the SSL session, if any is active, ornullif SSL is not active- Returns:
- the supplier of mechanisms (not
null)
-
createMechanismSupplier
public Supplier<String> createMechanismSupplier(Collection<String> mechNames)
Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies. When no preference between two mechanisms is specified, the original order is used.- Parameters:
mechNames- the mechanism names (must not benull)- Returns:
- the supplier of mechanisms (not
null)
-
createMechanismSupplier
public Supplier<String> createMechanismSupplier(Collection<String> mechNames, SSLSession sslSession)
Create a supplier of mechanism names that provides the names of the mechanisms which are matched by this selector in the preferential order that the selector specifies. When no preference between two mechanisms is specified, the original order is used.- Parameters:
mechNames- the mechanism names (must not benull)sslSession- the SSL session, if any is active, ornullif SSL is not active- Returns:
- the supplier of mechanisms (not
null)
-
apply
public List<String> apply(Collection<String> mechNames, SSLSession sslSession)
Get a list of mechanism names which are matched by this selector in the preferential order that the selector specifies. When no preference between two mechanisms is specified, the original order is used.- Parameters:
mechNames- the mechanism names (must not benull)sslSession- the SSL session, if any is active, ornullif SSL is not active- Returns:
- the list of mechanisms (not
null)
-
addMechanism
public SaslMechanismSelector addMechanism(String mechName)
-
addMechanisms
public SaslMechanismSelector addMechanisms(String... mechNames)
-
forbidMechanism
public SaslMechanismSelector forbidMechanism(String mechName)
-
forbidMechanisms
public SaslMechanismSelector forbidMechanisms(String... mechNames)
-
addMatching
public SaslMechanismSelector addMatching(SaslMechanismPredicate predicate)
-
forbidMatching
public SaslMechanismSelector forbidMatching(SaslMechanismPredicate predicate)
-
addAllRemaining
public SaslMechanismSelector addAllRemaining()
-
equals
public final boolean equals(SaslMechanismSelector selector)
-
fromString
public static SaslMechanismSelector fromString(String string)
-
-