This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
envoy/src/main/java/envoy/event/HandshakeRejectionEvent.java

64 lines
1.8 KiB
Java
Raw Normal View History

package envoy.event;
import envoy.data.LoginCredentials;
/**
* Signifies to the client that the handshake failed for the attached
* reason.<br>
* <br>
* Project: <strong>envoy-common</strong><br>
* File: <strong>HandshakeRejectionEvent.java</strong><br>
* Created: <strong>28 Jan 2020</strong><br>
*
* @author Kai S. K. Engelbart
* @since Envoy Common v0.3-alpha
*/
public class HandshakeRejectionEvent extends Event<String> {
/**
* Select this value if a given password hash was incorrect
*/
public static final String WRONG_PASSWORD = "an incorrect password was entered";
/**
* Select this value if a given {@link LoginCredentials} pointed at a client who
* is already online
*/
public static final String ALREADY_ONLINE = "user is already online";
/**
* Select this value if a given {@link LoginCredentials} pointed at a client who
* does not exist
*/
public static final String USER_DOES_NOT_EXIST = "user does not exist";
2020-02-08 09:17:11 +01:00
/**
* Select this value if a given {@link LoginCredentials} with
* {@link LoginCredentials#isRegistration()}==true points at an already existing
* user
*/
public static final String USER_EXISTS_ALREADY = "user can not be created as he already exists";
/**
* Select this value if an unknown error occurred
*/
public static final String UNKNOWN_REASON = "cause of failure is unknown";
private static final long serialVersionUID = -8723270093452609197L;
/**
* Creates an instance of {@link HandshakeRejectionEvent} with an empty reason.
*
* @since Envoy Common v0.3-alpha
*/
public HandshakeRejectionEvent() { super(""); }
/**
* Creates an instance of {@link HandshakeRejectionEvent}.
*
* @param reason the reason why the handshake was rejected
* @since Envoy Common v0.3-alpha
*/
public HandshakeRejectionEvent(String reason) { super(reason); }
}