All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.macrocloud.kernel.toolkit.response.HttpCode Maven / Gradle / Ivy

There is a newer version: 1.1.0-RELEASE
Show newest version
package org.macrocloud.kernel.toolkit.response;

public enum HttpCode {
	OK(200, "请求成功"),
	MULTI_STATUS(207, "频繁操作"), 
	LOGIN_FAIL(303, "登录失败"), 
	BAD_REQUEST(400, "请求参数出错"), 
	UNAUTHORIZED(401, "没有登录"), 
	FORBIDDEN(403, "没有权限"), 
	NOT_FOUND(404, "找不到页面"), 
	REQUEST_TIMEOUT(408, "请求超时"),
	CONFLICT(409, "发生冲突"), 
	GONE(410, "已被删除"), 
	LOCKED(423, "已被锁定"), 
	INTERNAL_SERVER_ERROR(500, "服务器出错");

	private final Integer value;
	private String message;

	private HttpCode(Integer value, String message) {
		this.value = value;
		this.message = message;
	}

	private HttpCode(Integer value) {
		this.value = value;
	}

	public Integer value() {
		return this.value;
	}

	public String msg() {
		return this.message;
	}

	public String toString() {
		return this.value.toString();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy