Added default reasons to HandshakeRejectionEvent
This commit is contained in:
		@@ -1,5 +1,7 @@
 | 
			
		||||
package envoy.event;
 | 
			
		||||
 | 
			
		||||
import envoy.data.LoginCredentials;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Signifies to the client that the handshake failed for the attached
 | 
			
		||||
 * reason.<br>
 | 
			
		||||
@@ -13,6 +15,28 @@ package envoy.event;
 | 
			
		||||
 */
 | 
			
		||||
public class HandshakeRejectionEvent implements 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";
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Select this value if an unknown error occurred
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String UNKNOWN_REASON = "cause of failure is unknown";
 | 
			
		||||
 | 
			
		||||
	private final String reason;
 | 
			
		||||
 | 
			
		||||
	private static final long serialVersionUID = -8723270093452609197L;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user