Class AbstractMechanism

    • Field Detail

      • EMPTY

        protected static final byte[] EMPTY
    • Constructor Detail

      • AbstractMechanism

        public AbstractMechanism()
    • Method Detail

      • init

        public void init​(Map<String,​String> options)
        Description copied from interface: Mechanism
        Perform any configuration initiation required by the mechanism.
        Specified by:
        init in interface Mechanism
        Parameters:
        options - An immutable map of sasl options. Will always be non-null.
      • verifyCompletion

        public void verifyCompletion()
                              throws SaslException
        Description copied from interface: Mechanism
        Verifies that the SASL exchange has completed successfully. This is an opportunity for the mechanism to ensure that all mandatory steps have been completed successfully and to cleanup and resources that are held by this Mechanism.
        Specified by:
        verifyCompletion in interface Mechanism
        Throws:
        SaslException - if the outcome of the SASL exchange is not valid for this Mechanism
      • setUsername

        public void setUsername​(String value)
        Description copied from interface: Mechanism
        Sets the user name value for this Mechanism. The Mechanism can ignore this value if it does not utilize user name in it's authentication processing.
        Specified by:
        setUsername in interface Mechanism
        Parameters:
        value - The user name given.
      • getUsername

        public String getUsername()
        Description copied from interface: Mechanism
        Returns the configured user name value for this Mechanism.
        Specified by:
        getUsername in interface Mechanism
        Returns:
        the currently set user name value for this Mechanism.
      • setPassword

        public void setPassword​(String value)
        Description copied from interface: Mechanism
        Sets the password value for this Mechanism. The Mechanism can ignore this value if it does not utilize a password in it's authentication processing.
        Specified by:
        setPassword in interface Mechanism
        Parameters:
        value - The user name given.
      • getPassword

        public String getPassword()
        Description copied from interface: Mechanism
        Returns the configured password value for this Mechanism.
        Specified by:
        getPassword in interface Mechanism
        Returns:
        the currently set password value for this Mechanism.
      • isEnabledByDefault

        public boolean isEnabledByDefault()
        Description copied from interface: Mechanism
        Allows the mechanism to indicate if it is enabled by default, or only when explicitly enabled through configuring the permitted sasl mechanisms.
        Specified by:
        isEnabledByDefault in interface Mechanism
        Returns:
        true if this Mechanism is enabled by default.