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 Details

  • Method Details

    • 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 be null)
      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 be null)
      sslSession - the SSL session, if any is active, or null if 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 be null)
      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 be null)
      sslSession - the SSL session, if any is active, or null if 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 be null)
      sslSession - the SSL session, if any is active, or null if 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()
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public final boolean equals(SaslMechanismSelector selector)
    • fromString

      public static SaslMechanismSelector fromString(String string)