Class UsernamePasswordMechanism.UsernamePasswordMechanismResponse

  • Enclosing class:
    UsernamePasswordMechanism

    public class UsernamePasswordMechanism.UsernamePasswordMechanismResponse
    extends java.lang.Object
    Simple inner class to delimit the response codes and progress some error messages.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFUNCT
      The not functioning code, meaning that the authentication method is unable to perform authentication.
      static int NOT_OK
      The not success code
      static int OK
      The success code
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()
      Returns the error message.
      int getResponse()
      Returns the status code.
      void setMessage​(java.lang.String message)
      Sets the error message, if and only if the response code is DEFUNCT.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFUNCT

        public static final int DEFUNCT
        The not functioning code, meaning that the authentication method is unable to perform authentication.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UsernamePasswordMechanismResponse

        public UsernamePasswordMechanismResponse​(int response)
        Creates a new UsernamePasswordMechanismResponse object.
        Parameters:
        response - The response code
        Throws:
        java.lang.IllegalArgumentException - Is thrown if the response code differs from the pre-defined return codes as well as the static parameters in this class, i.e. OK, NOT_OK or DEFUNCT.
    • Method Detail

      • setMessage

        public void setMessage​(java.lang.String message)
        Sets the error message, if and only if the response code is DEFUNCT.
        Parameters:
        message - The error message.
      • getMessage

        public java.lang.String getMessage()
        Returns the error message.
        Returns:
        The error message.
      • getResponse

        public int getResponse()
        Returns the status code.
        Returns:
        The status code.