Jetty如何实现NIO分析(三)

需要了解知识:    1.IO模型:参考  IO与操作系统关系(一)   JAVA几种IO工作机制及特点(二)     2.jetty容器: 参考 JETTY基本架构 1.jetty 模块分析详细参考官网:http://wiki.eclipse.org/Jetty/Reference/Dependencies  (jetty模块依赖)1.1 jetty依赖树: ...
摘要由CSDN通过智能技术生成

需要了解知识:

    1.IO模型:参考  IO与操作系统关系(一)   JAVA几种IO工作机制及特点(二) 

    2.jetty容器: 参考 JETTY基本架构

 

1.jetty 模块分析

详细参考官网:http://wiki.eclipse.org/Jetty/Reference/Dependencies  (jetty模块依赖)

1.1 jetty依赖树:

Dependencies.jpg

 

This diagram shows the compile dependencies for the Jetty project. The external dependencies are listed on the right hand side and all other modules shown are part of the project. 

 

1.2 jetty核心模块(http客户端 服务端通讯模块)

(官方解释)The jetty-util, jetty-io and jetty-http jars form the core of the jetty HTTP handler (generation and parsing) that is used for both the jetty-client and the jetty-server。

如下图:

我们平常最关心的就是 client 如何 server进行通讯,如何实现io通讯的,所以以下几个模块需要了解:

jetty-client:

jetty-server:

jetty-http:

jetty-io:

jetty-util:

 

1.3 jetty模块结构分析

注:下面讲解jetty核心代码类是用到jetty8中的selectChannelConnector,这里大家参考jetty8 API,jetty9已更换实现类为ServerConnector: 

jetty8 api:http://download.eclipse.org/jetty/8.1.17.v20150415/apidocs/ 

 

     1.3.1 添加依赖jetty插件,从search.maven.org 下载:

     

<!-- jetty -->
<dependency>
      <groupId>org.eclipse.jetty.aggregate</groupId>
      <artifactId>jetty-all-server</artifactId>
      <version>8.1.18.v20150929</version>
</dependency>
   依赖组件如下:

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值