Package org.wildfly.security.sasl.util
Class FilterMechanismSaslClientFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory
-
- org.wildfly.security.sasl.util.FilterMechanismSaslClientFactory
-
- All Implemented Interfaces:
SaslClientFactory
public final class FilterMechanismSaslClientFactory extends AbstractDelegatingSaslClientFactory
ASaslClientFactory
which filters available mechanisms (either inclusively or exclusively) from a delegateSaslClientFactory
.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description FilterMechanismSaslClientFactory(SaslClientFactory delegate, boolean include, String... mechanisms)
Construct a new instance.FilterMechanismSaslClientFactory(SaslClientFactory delegate, boolean include, Collection<String> mechanisms)
Construct a new instance.FilterMechanismSaslClientFactory(SaslClientFactory delegate, Predicate<String> predicate)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
calculateHashCode()
Perform the calculation of the hash code of this factory.SaslClient
createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
boolean
equals(Object other)
boolean
equals(AbstractDelegatingSaslClientFactory other)
boolean
equals(FilterMechanismSaslClientFactory other)
String[]
getMechanismNames(Map<String,?> props)
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory
delegatesThrough, hashCode, toString
-
-
-
-
Constructor Detail
-
FilterMechanismSaslClientFactory
public FilterMechanismSaslClientFactory(SaslClientFactory delegate, Predicate<String> predicate)
Construct a new instance.- Parameters:
delegate
- the factory to delegate topredicate
- the mechanism name predicate
-
FilterMechanismSaslClientFactory
public FilterMechanismSaslClientFactory(SaslClientFactory 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
-
FilterMechanismSaslClientFactory
public FilterMechanismSaslClientFactory(SaslClientFactory 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
-
createSaslClient
public SaslClient createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslClient
in interfaceSaslClientFactory
- Overrides:
createSaslClient
in classAbstractDelegatingSaslClientFactory
- Throws:
SaslException
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> props)
- Specified by:
getMechanismNames
in interfaceSaslClientFactory
- Overrides:
getMechanismNames
in classAbstractDelegatingSaslClientFactory
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classAbstractDelegatingSaslClientFactory
-
equals
public boolean equals(AbstractDelegatingSaslClientFactory other)
- Overrides:
equals
in classAbstractDelegatingSaslClientFactory
-
equals
public boolean equals(FilterMechanismSaslClientFactory other)
-
calculateHashCode
protected int calculateHashCode()
Description copied from class:AbstractDelegatingSaslClientFactory
Perform the calculation of the hash code of this factory.- Overrides:
calculateHashCode
in classAbstractDelegatingSaslClientFactory
- Returns:
- the calculated hash code
-
-