Enum SASLMechanism

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SASLMechanism>

    public enum SASLMechanism
    extends java.lang.Enum<SASLMechanism>
    Enum for holding various types of SASL mechanisms.
    Since:
    16.1
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SASLMechanism getForSaslName​(java.lang.String saslName)
      Get the enumerated value corresponding to the mechanism name.
      static java.util.EnumSet<SASLMechanism> getForSaslNames​(java.lang.String saslNames)
      Returns set of known SASLMechanisms listed in space separated list of mechanism names (unknown names are ignored).
      static java.util.EnumSet<SASLMechanism> getForSaslNames​(java.lang.String saslNames, boolean ignoreUnknown)
      Returns set of known SASLMechanisms listed in space separated list of mechanism names.
      static java.util.EnumSet<SASLMechanism> getSaslIdBasedMechanisms​(java.lang.Iterable<SASLMechanism> mechanisms)
      Filters given mechanism to return SASL ID based only.
      java.lang.String getSaslName()
      Returns mechanism's SASL name.
      boolean isSaslIDBased()
      Returns true when mechanism is based on SASL ID, false in other cases.
      java.lang.String toString()  
      static java.lang.String toString​(java.lang.Iterable<SASLMechanism> mechanisms)
      Returns string representation of SASLMechanisms
      static SASLMechanism valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SASLMechanism[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static SASLMechanism[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SASLMechanism c : SASLMechanism.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SASLMechanism valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSaslName

        public java.lang.String getSaslName()
        Returns mechanism's SASL name.
        Returns:
        mechanism's SASL name (not null)
      • isSaslIDBased

        public boolean isSaslIDBased()
        Returns true when mechanism is based on SASL ID, false in other cases.
        Returns:
        true when mechanism is based on SASL ID.
      • getForSaslName

        public static SASLMechanism getForSaslName​(java.lang.String saslName)
        Get the enumerated value corresponding to the mechanism name.
        Parameters:
        saslName - (null allowed - will return null)
        Returns:
        the enumeration corresponding to the first of the mechanisms in sp, or null if there is no match
      • getForSaslNames

        public static java.util.EnumSet<SASLMechanism> getForSaslNames​(java.lang.String saslNames,
                                                                       boolean ignoreUnknown)
                                                                throws BadValueException
        Returns set of known SASLMechanisms listed in space separated list of mechanism names.
        Parameters:
        saslNames - space separated list of mechanism names (null allowed will return empty set).
        ignoreUnknown - set to true will cause ignoring unknown mechanism names, false will cause throwing exception.
        Returns:
        set of SASLMechanisms (not null but may be empty)
        Throws:
        BadValueException - on unknown SASL mechanism name when ignoreUnknown is set to false
      • getForSaslNames

        public static java.util.EnumSet<SASLMechanism> getForSaslNames​(java.lang.String saslNames)
        Returns set of known SASLMechanisms listed in space separated list of mechanism names (unknown names are ignored).
        Parameters:
        saslNames - space separated list of mechanism names (null allowed will return empty set).
        Returns:
        set of SASLMechanisms (not null but may be empty)
      • getSaslIdBasedMechanisms

        public static java.util.EnumSet<SASLMechanism> getSaslIdBasedMechanisms​(java.lang.Iterable<SASLMechanism> mechanisms)
        Filters given mechanism to return SASL ID based only.
        Parameters:
        mechanisms - to be filtered (not null)
        Returns:
        SASL ID based only mechanisms (not null)
      • toString

        public static java.lang.String toString​(java.lang.Iterable<SASLMechanism> mechanisms)
        Returns string representation of SASLMechanisms
        Parameters:
        mechanisms - (not null)
        Returns:
        string representation of SASLMechanisms (not null)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<SASLMechanism>