Class UsernamePasswordMechanism.UsernamePasswordMechanismResponse
- java.lang.Object
-
- com.portwise.mvpnms.authentication.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.
-
-
Constructor Summary
Constructors Constructor Description UsernamePasswordMechanismResponse(int response)
Creates a newUsernamePasswordMechanismResponse
object.
-
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.
-
-
-
Field Detail
-
OK
public static final int OK
The success code- See Also:
- Constant Field Values
-
NOT_OK
public static final int NOT_OK
The not success code- See Also:
- Constant Field Values
-
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 newUsernamePasswordMechanismResponse
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.
-
-