diff --git a/src/main/java/envoy/event/HandshakeRejection.java b/src/main/java/envoy/event/HandshakeRejection.java index 7033373..3eeb1d9 100644 --- a/src/main/java/envoy/event/HandshakeRejection.java +++ b/src/main/java/envoy/event/HandshakeRejection.java @@ -2,8 +2,8 @@ package envoy.event; /** * Signifies to the client that the handshake failed for the attached - * reason.
- *
+ * reason. + *

* Project: envoy-common
* File: HandshakeRejection.java
* Created: 28 Jan 2020
@@ -14,23 +14,44 @@ package envoy.event; public class HandshakeRejection extends Event { /** - * Select this value if a given password hash or user was incorrect. + * Select this value if a given password hash or user name was incorrect. + * + * @since Envoy Common v0.3-alpha */ public static final String WRONG_PASSWORD_OR_USER = "Incorrect user name or password."; /** - * Select this value if the handshake could not be completed for some reason. + * Select this value if a given user name for a registration is already taken. + * + * @since Envoy Common v0.1-beta + */ + public static final String USERNAME_TAKEN = "Incorrect user name or password."; + + /** + * Select this value if the version of the client is incompatible with the + * server. + * + * @since Envoy Common v0.1-beta + */ + public static final String WRONG_VERSION = "Incompatible client version"; + + /** + * Select this value if the handshake could not be completed for some different + * reason. + * + * @since Envoy Common v0.3-alpha */ public static final String INTERNAL_ERROR = "An internal error occured."; private static final long serialVersionUID = 0L; /** - * Creates an instance of {@link HandshakeRejection} with an empty reason. + * Creates an instance of {@link HandshakeRejection} with the generic + * {@link HandshakeRejection#INTERNAL_ERROR} reason. * * @since Envoy Common v0.3-alpha */ - public HandshakeRejection() { super(""); } + public HandshakeRejection() { super(INTERNAL_ERROR); } /** * Creates an instance of {@link HandshakeRejection}.