com.thehellings.gully.http.ResponseCode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gully Show documentation
Show all versions of gully Show documentation
Some basic, useful routers, handlers, etc for Undertow.
package com.thehellings.gully.http;
/**
* A listing of common HTTP response codes, with some friendly names, and their response codes.
*
* Only those which are needed have been added for now, more will be added as they are used by the application or
* any of its supporting applications.
*/
public enum ResponseCode {
REDIRECT_PERMANENT(302),
ERROR_NOT_FOUND(404),
SERVER_ERROR(500);
private int code;
ResponseCode(int code) {
this.code = code;
}
/**
* Gives back the numeric response code for this response message
*
* @return numeric HTTP code
*/
public int getCode() {
return this.code;
}
}