- 浏览: 738488 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
lgh1992314:
a offset: 26b offset: 24c offse ...
java jvm字节占用空间分析 -
ls0609:
语音实现在线听书http://blog.csdn.net/ls ...
Android 语音输入API使用 -
wangli61289:
http://viralpatel-net-tutorials ...
Android 语音输入API使用 -
zxjlwt:
学习了素人派http://surenpi.com
velocity宏加载顺序 -
tt5753:
谢啦........
Lucene的IndexWriter初始化时的LockObtainFailedException的解决方法
public class HttpStatus { public final static int CONTINUE_100 = 100; public final static int SWITCHING_PROTOCOLS_101 = 101; public final static int PROCESSING_102 = 102; public final static int OK_200 = 200; public final static int CREATED_201 = 201; public final static int ACCEPTED_202 = 202; public final static int NON_AUTHORITATIVE_INFORMATION_203 = 203; public final static int NO_CONTENT_204 = 204; public final static int RESET_CONTENT_205 = 205; public final static int PARTIAL_CONTENT_206 = 206; public final static int MULTI_STATUS_207 = 207; public final static int MULTIPLE_CHOICES_300 = 300; public final static int MOVED_PERMANENTLY_301 = 301; public final static int MOVED_TEMPORARILY_302 = 302; public final static int FOUND_302 = 302; public final static int SEE_OTHER_303 = 303; public final static int NOT_MODIFIED_304 = 304; public final static int USE_PROXY_305 = 305; public final static int TEMPORARY_REDIRECT_307 = 307; public final static int BAD_REQUEST_400 = 400; public final static int UNAUTHORIZED_401 = 401; public final static int PAYMENT_REQUIRED_402 = 402; public final static int FORBIDDEN_403 = 403; public final static int NOT_FOUND_404 = 404; public final static int METHOD_NOT_ALLOWED_405 = 405; public final static int NOT_ACCEPTABLE_406 = 406; public final static int PROXY_AUTHENTICATION_REQUIRED_407 = 407; public final static int REQUEST_TIMEOUT_408 = 408; public final static int CONFLICT_409 = 409; public final static int GONE_410 = 410; public final static int LENGTH_REQUIRED_411 = 411; public final static int PRECONDITION_FAILED_412 = 412; public final static int REQUEST_ENTITY_TOO_LARGE_413 = 413; public final static int REQUEST_URI_TOO_LONG_414 = 414; public final static int UNSUPPORTED_MEDIA_TYPE_415 = 415; public final static int REQUESTED_RANGE_NOT_SATISFIABLE_416 = 416; public final static int EXPECTATION_FAILED_417 = 417; public final static int UNPROCESSABLE_ENTITY_422 = 422; public final static int LOCKED_423 = 423; public final static int FAILED_DEPENDENCY_424 = 424; public final static int INTERNAL_SERVER_ERROR_500 = 500; public final static int NOT_IMPLEMENTED_501 = 501; public final static int BAD_GATEWAY_502 = 502; public final static int SERVICE_UNAVAILABLE_503 = 503; public final static int GATEWAY_TIMEOUT_504 = 504; public final static int HTTP_VERSION_NOT_SUPPORTED_505 = 505; public final static int INSUFFICIENT_STORAGE_507 = 507; public static final int MAX_CODE = 507; private static final Code[] codeMap = new Code[MAX_CODE+1]; static { for (Code code : Code.values()) { codeMap[code._code] = code; } } public enum Code { /* * -------------------------------------------------------------------- * Informational messages in 1xx series. As defined by ... RFC 1945 - * HTTP/1.0 RFC 2616 - HTTP/1.1 RFC 2518 - WebDAV */ /** <code>100 Continue</code> */ CONTINUE(CONTINUE_100, "Continue"), /** <code>101 Switching Protocols</code> */ SWITCHING_PROTOCOLS(SWITCHING_PROTOCOLS_101, "Switching Protocols"), /** <code>102 Processing</code> */ PROCESSING(PROCESSING_102, "Processing"), /* * -------------------------------------------------------------------- * Success messages in 2xx series. As defined by ... RFC 1945 - HTTP/1.0 * RFC 2616 - HTTP/1.1 RFC 2518 - WebDAV */ /** <code>200 OK</code> */ OK(OK_200, "OK"), /** <code>201 Created</code> */ CREATED(CREATED_201, "Created"), /** <code>202 Accepted</code> */ ACCEPTED(ACCEPTED_202, "Accepted"), /** <code>203 Non Authoritative Information</code> */ NON_AUTHORITATIVE_INFORMATION(NON_AUTHORITATIVE_INFORMATION_203, "Non Authoritative Information"), /** <code>204 No Content</code> */ NO_CONTENT(NO_CONTENT_204, "No Content"), /** <code>205 Reset Content</code> */ RESET_CONTENT(RESET_CONTENT_205, "Reset Content"), /** <code>206 Partial Content</code> */ PARTIAL_CONTENT(PARTIAL_CONTENT_206, "Partial Content"), /** <code>207 Multi-Status</code> */ MULTI_STATUS(MULTI_STATUS_207, "Multi-Status"), /* * -------------------------------------------------------------------- * Redirection messages in 3xx series. As defined by ... RFC 1945 - * HTTP/1.0 RFC 2616 - HTTP/1.1 */ /** <code>300 Mutliple Choices</code> */ MULTIPLE_CHOICES(MULTIPLE_CHOICES_300, "Multiple Choices"), /** <code>301 Moved Permanently</code> */ MOVED_PERMANENTLY(MOVED_PERMANENTLY_301, "Moved Permanently"), /** <code>302 Moved Temporarily</code> */ MOVED_TEMPORARILY(MOVED_TEMPORARILY_302, "Moved Temporarily"), /** <code>302 Found</code> */ FOUND(FOUND_302, "Found"), /** <code>303 See Other</code> */ SEE_OTHER(SEE_OTHER_303, "See Other"), /** <code>304 Not Modified</code> */ NOT_MODIFIED(NOT_MODIFIED_304, "Not Modified"), /** <code>305 Use Proxy</code> */ USE_PROXY(USE_PROXY_305, "Use Proxy"), /** <code>307 Temporary Redirect</code> */ TEMPORARY_REDIRECT(TEMPORARY_REDIRECT_307, "Temporary Redirect"), /* * -------------------------------------------------------------------- * Client Error messages in 4xx series. As defined by ... RFC 1945 - * HTTP/1.0 RFC 2616 - HTTP/1.1 RFC 2518 - WebDAV */ /** <code>400 Bad Request</code> */ BAD_REQUEST(BAD_REQUEST_400, "Bad Request"), /** <code>401 Unauthorized</code> */ UNAUTHORIZED(UNAUTHORIZED_401, "Unauthorized"), /** <code>402 Payment Required</code> */ PAYMENT_REQUIRED(PAYMENT_REQUIRED_402, "Payment Required"), /** <code>403 Forbidden</code> */ FORBIDDEN(FORBIDDEN_403, "Forbidden"), /** <code>404 Not Found</code> */ NOT_FOUND(NOT_FOUND_404, "Not Found"), /** <code>405 Method Not Allowed</code> */ METHOD_NOT_ALLOWED(METHOD_NOT_ALLOWED_405, "Method Not Allowed"), /** <code>406 Not Acceptable</code> */ NOT_ACCEPTABLE(NOT_ACCEPTABLE_406, "Not Acceptable"), /** <code>407 Proxy Authentication Required</code> */ PROXY_AUTHENTICATION_REQUIRED(PROXY_AUTHENTICATION_REQUIRED_407, "Proxy Authentication Required"), /** <code>408 Request Timeout</code> */ REQUEST_TIMEOUT(REQUEST_TIMEOUT_408, "Request Timeout"), /** <code>409 Conflict</code> */ CONFLICT(CONFLICT_409, "Conflict"), /** <code>410 Gone</code> */ GONE(GONE_410, "Gone"), /** <code>411 Length Required</code> */ LENGTH_REQUIRED(LENGTH_REQUIRED_411, "Length Required"), /** <code>412 Precondition Failed</code> */ PRECONDITION_FAILED(PRECONDITION_FAILED_412, "Precondition Failed"), /** <code>413 Request Entity Too Large</code> */ REQUEST_ENTITY_TOO_LARGE(REQUEST_ENTITY_TOO_LARGE_413, "Request Entity Too Large"), /** <code>414 Request-URI Too Long</code> */ REQUEST_URI_TOO_LONG(REQUEST_URI_TOO_LONG_414, "Request-URI Too Long"), /** <code>415 Unsupported Media Type</code> */ UNSUPPORTED_MEDIA_TYPE(UNSUPPORTED_MEDIA_TYPE_415, "Unsupported Media Type"), /** <code>416 Requested Range Not Satisfiable</code> */ REQUESTED_RANGE_NOT_SATISFIABLE(REQUESTED_RANGE_NOT_SATISFIABLE_416, "Requested Range Not Satisfiable"), /** <code>417 Expectation Failed</code> */ EXPECTATION_FAILED(EXPECTATION_FAILED_417, "Expectation Failed"), /** <code>422 Unprocessable Entity</code> */ UNPROCESSABLE_ENTITY(UNPROCESSABLE_ENTITY_422, "Unprocessable Entity"), /** <code>423 Locked</code> */ LOCKED(LOCKED_423, "Locked"), /** <code>424 Failed Dependency</code> */ FAILED_DEPENDENCY(FAILED_DEPENDENCY_424, "Failed Dependency"), /* * -------------------------------------------------------------------- * Server Error messages in 5xx series. As defined by ... RFC 1945 - * HTTP/1.0 RFC 2616 - HTTP/1.1 RFC 2518 - WebDAV */ /** <code>500 Server Error</code> */ INTERNAL_SERVER_ERROR(INTERNAL_SERVER_ERROR_500, "Server Error"), /** <code>501 Not Implemented</code> */ NOT_IMPLEMENTED(NOT_IMPLEMENTED_501, "Not Implemented"), /** <code>502 Bad Gateway</code> */ BAD_GATEWAY(BAD_GATEWAY_502, "Bad Gateway"), /** <code>503 Service Unavailable</code> */ SERVICE_UNAVAILABLE(SERVICE_UNAVAILABLE_503, "Service Unavailable"), /** <code>504 Gateway Timeout</code> */ GATEWAY_TIMEOUT(GATEWAY_TIMEOUT_504, "Gateway Timeout"), /** <code>505 HTTP Version Not Supported</code> */ HTTP_VERSION_NOT_SUPPORTED(HTTP_VERSION_NOT_SUPPORTED_505, "HTTP Version Not Supported"), /** <code>507 Insufficient Storage</code> */ INSUFFICIENT_STORAGE(INSUFFICIENT_STORAGE_507, "Insufficient Storage"); private final int _code; private final String _message; private Code(int code, String message) { this._code = code; _message=message; } public int getCode() { return _code; } public String getMessage() { return _message; } public boolean equals(int code) { return (this._code == code); } @Override public String toString() { return String.format("[%03d %s]",this._code,this.getMessage()); } /** * Simple test against an code to determine if it falls into the * <code>Informational</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, * and <a href="http://tools.ietf.org/html/rfc2616">RFC 2616 - * HTTP/1.1</a>. * * @return true if within range of codes that belongs to * <code>Informational</code> messages. */ public boolean isInformational() { return HttpStatus.isInformational(this._code); } /** * Simple test against an code to determine if it falls into the * <code>Success</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, * and <a href="http://tools.ietf.org/html/rfc2616">RFC 2616 - * HTTP/1.1</a>. * * @return true if within range of codes that belongs to * <code>Success</code> messages. */ public boolean isSuccess() { return HttpStatus.isSuccess(this._code); } /** * Simple test against an code to determine if it falls into the * <code>Redirection</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, * and <a href="http://tools.ietf.org/html/rfc2616">RFC 2616 - * HTTP/1.1</a>. * * @return true if within range of codes that belongs to * <code>Redirection</code> messages. */ public boolean isRedirection() { return HttpStatus.isRedirection(this._code); } /** * Simple test against an code to determine if it falls into the * <code>Client Error</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, * and <a href="http://tools.ietf.org/html/rfc2616">RFC 2616 - * HTTP/1.1</a>. * * @return true if within range of codes that belongs to * <code>Client Error</code> messages. */ public boolean isClientError() { return HttpStatus.isClientError(this._code); } /** * Simple test against an code to determine if it falls into the * <code>Server Error</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, * and <a href="http://tools.ietf.org/html/rfc2616">RFC 2616 - * HTTP/1.1</a>. * * @return true if within range of codes that belongs to * <code>Server Error</code> messages. */ public boolean isServerError() { return HttpStatus.isServerError(this._code); } } /** * Get the HttpStatusCode for a specific code * * @param code * the code to lookup. * @return the {@link HttpStatus} if found, or null if not found. */ public static Code getCode(int code) { if (code <= MAX_CODE) { return codeMap[code]; } return null; } /** * Get the status message for a specific code. * * @param code * the code to look up * @return the specific message, or the code number itself if code * does not match known list. */ public static String getMessage(int code) { Code codeEnum = getCode(code); if (codeEnum != null) { return codeEnum.getMessage(); } else { return Integer.toString(code); } } /** * Simple test against an code to determine if it falls into the * <code>Informational</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, and <a * href="http://tools.ietf.org/html/rfc2616">RFC 2616 - HTTP/1.1</a>. * * @param code * the code to test. * @return true if within range of codes that belongs to * <code>Informational</code> messages. */ public static boolean isInformational(int code) { return ((100 <= code) && (code <= 199)); } /** * Simple test against an code to determine if it falls into the * <code>Success</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, and <a * href="http://tools.ietf.org/html/rfc2616">RFC 2616 - HTTP/1.1</a>. * * @param code * the code to test. * @return true if within range of codes that belongs to * <code>Success</code> messages. */ public static boolean isSuccess(int code) { return ((200 <= code) && (code <= 299)); } /** * Simple test against an code to determine if it falls into the * <code>Redirection</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, and <a * href="http://tools.ietf.org/html/rfc2616">RFC 2616 - HTTP/1.1</a>. * * @param code * the code to test. * @return true if within range of codes that belongs to * <code>Redirection</code> messages. */ public static boolean isRedirection(int code) { return ((300 <= code) && (code <= 399)); } /** * Simple test against an code to determine if it falls into the * <code>Client Error</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, and <a * href="http://tools.ietf.org/html/rfc2616">RFC 2616 - HTTP/1.1</a>. * * @param code * the code to test. * @return true if within range of codes that belongs to * <code>Client Error</code> messages. */ public static boolean isClientError(int code) { return ((400 <= code) && (code <= 499)); } /** * Simple test against an code to determine if it falls into the * <code>Server Error</code> message category as defined in the <a * href="http://tools.ietf.org/html/rfc1945">RFC 1945 - HTTP/1.0</a>, and <a * href="http://tools.ietf.org/html/rfc2616">RFC 2616 - HTTP/1.1</a>. * * @param code * the code to test. * @return true if within range of codes that belongs to * <code>Server Error</code> messages. */ public static boolean isServerError(int code) { return ((500 <= code) && (code <= 599)); } }
发表评论
-
使用telnet连接到基于spring的应用上执行容器中的bean的任意方法
2013-08-08 09:17 1423使用telnet连接到基于spring的应用上执行容器中 ... -
Lucene的IndexWriter初始化时的LockObtainFailedException的解决方法
2013-06-28 21:35 11727原文链接: http://www.javaarch.net ... -
Spring Security Logout
2013-06-03 00:05 2317原文地址:http://www.javaarch.net/ ... -
Spring Security Basic Authentication
2013-06-03 00:04 1690原文地址:http://www.javaarch.net/ ... -
Spring Security Form Login
2013-06-02 16:16 2107原文地址:http://www.javaarch.net/j ... -
spring3 的restful API RequestMapping介绍
2013-06-02 14:53 1112原文链接:http://www.javaarch.net/j ... -
spring使用PropertyPlaceholderConfigurer扩展来满足不同环境的参数配置
2013-05-21 15:57 3283spring使用PropertyPlaceholderCon ... -
spring3学习入门示例工程
2013-04-18 09:28 10831. github地址 https://github ... -
spring map使用annotation泛型注入问题分析
2013-04-15 13:30 8498今天在整一个spring的ioc学习demo,碰到 ... -
利用spring AOP和Annotation来简化DAO实现
2013-01-06 23:31 2225通常在数据库DAO层的查询中,我们会定义一个DAO接口,而在实 ... -
spring rmi学习示例
2012-09-21 17:42 1293spring rmi实际上是扩展了下java rmi的实 ... -
一种简单的本地cache的实现
2012-08-25 17:24 2092我们经常在web应用中需要对某些数据进行本地cache,特别是 ... -
j2ee页面静态化方案encache web cache框架源码分析2
2012-05-30 18:19 2743encache的web cache代码分析 1.抽象f ... -
j2ee页面静态化方案encache web cache框架详解1
2012-05-30 16:37 1996web caching 1.介绍 Ehcache W ... -
java 的svn客户端调用示例
2012-05-25 21:50 38161.pom依赖 < ... -
java 的svn客户端调用示例
2012-05-25 21:48 8821.pom依赖 <dependency> ... -
Spring Data MongoDB hello world 示例
2012-05-24 17:36 1734下面讲解如何使用spring-data-mongdb来对 ... -
spring-data spring 的nosql的orm框架设计学习
2012-05-24 17:05 54661.spring-data-redis如何连接到redis服 ... -
spring-data spring 的nosql的orm框架学习
2012-05-24 15:34 4626使用了spring-data-redis对于redis的orm ... -
log4j MDC NDC应用场景
2012-05-22 22:17 2239NDC(Nested Diagnostic Context)和 ...
相关推荐
这个包里面包含jetty的http包,最新版的(至今)jetty-7.0,里面根本没有http相关的包,我在进行junit in action学习中,有一个实例JettySample及相关jetty的例子,都必须用到.后来网络上费了很大的劲才找到,很不容易!
赠送jar包:jetty-http-9.4.11.v20180605.jar; 赠送原API文档:jetty-http-9.4.11.v20180605-javadoc.jar; 赠送源代码:jetty-http-9.4.11.v20180605-sources.jar; 赠送Maven依赖信息文件:jetty-...
jar包版本9.4.8.v20171121,包含jetty-server-9.4.8.v20171121.jar,jetty-servlet-9.4.8.v20171121.jar,jetty-http-9.4.8.v20171121.jar,jetty-webapp-9.4.8.v20171121.jar,jetty-servlets-9.4.8.v20171121.jar...
jetty-http-7.4.2.v20110526.jar jetty-http 服务jar包
赠送jar包:jetty-http-9.3.19.v20170502.jar; 赠送原API文档:jetty-http-9.3.19.v20170502-javadoc.jar; 赠送源代码:jetty-http-9.3.19.v20170502-sources.jar; 赠送Maven依赖信息文件:jetty-...
赠送jar包:jetty-http-9.4.43.v20210629.jar; 赠送原API文档:jetty-http-9.4.43.v20210629-javadoc.jar; 赠送源代码:jetty-http-9.4.43.v20210629-sources.jar; 赠送Maven依赖信息文件:jetty-...
赠送jar包:jetty-http-9.4.8.v20171121.jar; 赠送原API文档:jetty-http-9.4.8.v20171121-javadoc.jar; 赠送源代码:jetty-http-9.4.8.v20171121-sources.jar; 赠送Maven依赖信息文件:jetty-...
Jetty是一个纯Java实现的开源Servlet容器,Jetty也可以作为HTTP服务器和HTTP客户端,Jetty仪器轻巧,稳定和高性能而著称,完全可以胜任企业级Servlet容器的要求。Jetty允许Apache Licence 2.0或者Eclipse Public ...
赠送jar包:jetty-http-9.4.43.v20210629.jar; 赠送原API文档:jetty-http-9.4.43.v20210629-javadoc.jar; 赠送源代码:jetty-http-9.4.43.v20210629-sources.jar; 赠送Maven依赖信息文件:jetty-...
jetty-9.4.6
android i-jetty servlet-api-2.5.jar jetty-servlet-7.6.0.RC4.jar jetty-server-7.6.0.RC4.jar jetty-http-7.6.0.RC4.jar
NULL 博文链接:https://kanpiaoxue.iteye.com/blog/2110496
jetty demo 简单 jetty eclipse demo .jetty 轻量级的web容器,在服务器开发中经常用到,在做服务器与服务器之间通讯的时候 。
eclipse jetty插件,从...下载run-jetty-run.zip文件,解压后再编写个links文件丢到eclipse的dropins目录下即可,省去了使用eclipse update方式安装的麻烦。 link文件样例如: path=d:\\eclipse_plugins\\run-jetty-run
jdk1.7 jetty9.2.13 maven3.3.3 很基础的例子,来自官网,写成了DEMO,更加方便学习。包括jetty作为Http 服务器和 Web 容器的基础实现。
jetty是什么 jetty配置 jetty使用 jetty嵌入 jetty启动 jetty部署 jetty教程 jetty嵌入式 jetty
Jetty是一个开源项目,提供了http服务器、http客户端和java servlet容器。 这个wiki提供jetty的入门教程、基础配置、功能特性、优化、安全、JavaEE、监控、常见问题、故障排除帮助等等。它包含教程、使用手册、视频...
jetty相关所有jar包,...jetty-continuation-8.1.15.v20140411,jetty-http-8.1.15.v20140411,jetty-io-8.1.15.v20140411,jetty-security-8.1.15.v20140411,jetty-server-8.1.15.v20140411,jetty-util-8.1.15.v20140411
但是有了 Jetty: 即使在有大量服务请求的情况下,系统的性能也能保持在一个可以接受的状态。利用 Continuation 机制来处理大量的用户请求以及时间比较长的连接。 另外 Jetty 设计了非常良好的接口,因此在 Jetty 的...
.jetty