Package org.wildfly.security.sasl.util
Class SortedMechanismClientServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory
-
- org.wildfly.security.sasl.util.SortedMechanismClientServerFactory
-
- All Implemented Interfaces:
SaslClientFactory
public class SortedMechanismClientServerFactory extends AbstractDelegatingSaslClientFactory
A delegatingSaslClientFactory
which will sort the mechanism names using either a suppliedComparator
<String
> or a supplied ordering of mechanism names.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description private Comparator<String>
mechanismNameComparator
private SaslMechanismSelector
saslMechanismSelector
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description SortedMechanismClientServerFactory(SaslClientFactory delegate, String... mechanismNames)
SortedMechanismClientServerFactory(SaslClientFactory delegate, Comparator<String> mechanismNameComparator)
-
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(SortedMechanismClientServerFactory other)
String[]
getMechanismNames(Map<String,?> props)
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory
delegatesThrough, delegatesThroughNN, hashCode, toString
-
-
-
-
Field Detail
-
mechanismNameComparator
private final Comparator<String> mechanismNameComparator
-
saslMechanismSelector
private final SaslMechanismSelector saslMechanismSelector
-
-
Constructor Detail
-
SortedMechanismClientServerFactory
public SortedMechanismClientServerFactory(SaslClientFactory delegate, Comparator<String> mechanismNameComparator)
-
SortedMechanismClientServerFactory
public SortedMechanismClientServerFactory(SaslClientFactory delegate, String... mechanismNames)
-
-
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(SortedMechanismClientServerFactory 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
-
-