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

org.mattressframework.api.http.HttpStatus Maven / Gradle / Ivy

Go to download

Public API to the Mattress framework. This is essentially what JSR 311 should be.

There is a newer version: 1.0.0-ALPHA4
Show newest version
/*
 * Copyright 2007-2008, Josh Devins.
 *
 * Licensed under the Apache License, Version 2.0  = the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.mattressframework.api.http;

/**
 * Interface defining of all the HTTP status codes as per the RFC.
 * 
 * 
    *
  • 1xx: Informational - Request received, continuing process
  • *
  • 2xx: Success - The action was successfully received, understood, and * accepted
  • *
  • 3xx: Redirection - Further action must be taken in order to complete the * request
  • *
  • 4xx: Client Error - The request contains bad syntax or cannot be * fulfilled
  • *
  • 5xx: Server Error - The server failed to fulfill an apparently valid * request
  • *
* * @see RFC 2616 = HTTP/1.1), Section 6.1.1 Status Code and Reason Phrase * @see IANA registry, HTTP status * codes * * @author Josh Devins ([email protected]) */ public interface HttpStatus { /** * Category: Informational - Request received, continuing process
* Status code: 100
* Reason phrase: Continue */ public static final int INFO_CONTINUE = 100; /** * Category: Informational - Request received, continuing process
* Status code: 101
* Reason phrase: Switching Protocols */ public static final int INFO_SWITCHING_PROTOCOLS = 101; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 400
* Reason phrase: Bad Request */ public static final int CLIENT_BAD_REQUEST = 400; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 409
* Reason phrase: Conflict */ public static final int CLIENT_CONFLICT = 409; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 417
* Reason phrase: Expectation Failed */ public static final int CLIENT_EXPECTATION_FAILED = 417; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 403
* Reason phrase: Forbidden */ public static final int CLIENT_FORBIDDEN = 403; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 410
* Reason phrase: Gone */ public static final int CLIENT_GONE = 410; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 411
* Reason phrase: Length Required */ public static final int CLIENT_LENGTH_REQUIRED = 411; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 405
* Reason phrase: Method Not Allowed */ public static final int CLIENT_METHOD_NOT_ALLOWED = 405; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 406
* Reason phrase: Not Acceptable */ public static final int CLIENT_NOT_ACCEPTABLE = 406; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 404
* Reason phrase: Not Found */ public static final int CLIENT_NOT_FOUND = 404; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 402
* Reason phrase: Payment Required */ public static final int CLIENT_PAYMENT_REQUIRED = 402; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 412
* Reason phrase: Precondition Failed */ public static final int CLIENT_PRECONDITION_FAILED = 412; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 407
* Reason phrase: Proxy Authentication Required */ public static final int CLIENT_PROXY_AUTHENTICATION_REQUIRED = 407; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 413
* Reason phrase: Request Entity Too Large */ public static final int CLIENT_REQUEST_ENTITY_TOO_LARGE = 413; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 408
* Reason phrase: Request Time-out */ public static final int CLIENT_REQUEST_TIMEOUT = 408; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 414
* Reason phrase: Request-URI Too Large */ public static final int CLIENT_REQUEST_URI_TOO_LARGE = 414; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 416
* Reason phrase: Request Range Not Satisfiable */ public static final int CLIENT_REQUESTED_RANGE_NOT_SATISFIABLE = 416; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 401
* Reason phrase: Unauthorized */ public static final int CLIENT_UNAUTHORIZED = 401; /** * Category: Client Error - The request contains bad syntax or cannot be * fulfilled
* Status code: 415
* Reason phrase: Unsupported Media Type */ public static final int CLIENT_UNSUPPORTED_MEDIA_TYPE = 415; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 302
* Reason phrase: Found */ public static final int REDIRECT_FOUND = 302; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 301
* Reason phrase: Moved Permanently */ public static final int REDIRECT_MOVED_PERMANENTLY = 301; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 300
* Reason phrase: Multiple Choices */ public static final int REDIRECT_MULTIPLE_CHOICES = 300; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 304
* Reason phrase: Not Modified */ public static final int REDIRECT_NOT_MODIFIED = 304; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 303
* Reason phrase: See Other */ public static final int REDIRECT_SEE_OTHER = 303; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 307
* Reason phrase: Temporary Redirect */ public static final int REDIRECT_TEMPORARY_REDIRECT = 307; /** * Category: Redirection - Further action must be taken in order to complete * the request
* Status code: 305
* Reason phrase: Use Proxy */ public static final int REDIRECT_USE_PROXY = 305; /** * Category: Server Error - The server failed to fulfill an apparently valid * request
* Status code: 502
* Reason phrase: Bad Gateway */ public static final int SERVER_BAD_GATEWAY = 502; /** * Category: Server Error - The server failed to fulfill an apparently valid * request
* Status code: 504
* Reason phrase: Gateway Time-out */ public static final int SERVER_GATEWAY_TIMEOUT = 504; /** * Category: Server Error - The server failed to fulfill an apparently valid * request
* Status code: 505
* Reason phrase: HTTP Version Not Supported */ public static final int SERVER_HTTP_VERSION_NOT_SUPPORTED = 505; /** * Category: Server Error - The server failed to fulfill an apparently valid * request
* Status code: 500
* Reason phrase: Internal Server Error */ public static final int SERVER_INTERNAL_SERVER_ERROR = 500; /** * Category: Server Error - The server failed to fulfill an apparently valid * request
* Status code: 501
* Reason phrase: Not Implemented */ public static final int SERVER_NOT_IMPLEMENTED = 501; /** * Category: Server Error - The server failed to fulfill an apparently valid * request
* Status code: 503
* Reason phrase: Service Unavailable */ public static final int SERVER_SERVICE_UNAVAILABLE = 503; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 202
* Reason phrase: Accepted */ public static final int SUCCESS_ACCEPTED = 202; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 201
* Reason phrase: Created */ public static final int SUCCESS_CREATED = 201; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 204
* Reason phrase: No Content */ public static final int SUCCESS_NO_CONTENT = 204; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 203
* Reason phrase: Non-Authoritative Information */ public static final int SUCCESS_NON_AUTHORITATIVE_INFORMATION = 203; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 200
* Reason phrase: OK */ public static final int SUCCESS_OK = 200; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 206
* Reason phrase: Partial Content */ public static final int SUCCESS_PARTIAL_CONTENT = 206; /** * Category: Success - The action was successfully received, understood, and * accepted
* Status code: 205
* Reason phrase: Reset Content */ public static final int SUCCESS_RESET_CONTENT = 205; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy