mina框架分析:总体结构分析

1.首先,了解下mina框架有哪些特点,适合什么样的场景

MINA is a simple yet full-featurednetwork application framework which provides:

//可以支持各种协议,包括自己的协议

  • Unified API for various transport types:
    • TCP/IP & UDP/IP via Java NIO
    • Serial communication (RS232) via RXTX
    • In-VM pipe communication
    • You can implement your own!

//提供滤波器接口

  • Filter interface as an extension point; similar to Servlet filters

//可以调用不同类型的API,低层次的有ByteBuffer,高层次的有用户自己定义消息对象

  • Low-level and high-level API:
    • Low-level: uses ByteBuffers
    • High-level: uses user-defined message objects and codecs

//非常个性化的线程订制,可以提供单线程,单线程池,多线程池

  • Highly customizable thread model:
    • Single thread
    • One thread pool
    • More than one thread pools (i.e. SEDA)
  • Out-of-the-box SSL · TLS · StartTLS support using Java 5 SSLEngine
  • Overload shielding & traffic throttling
  • Unit testability using mock objects
  • JMX manageability

//支持对象流

  • Stream-based I/O support via StreamIoHandler
  • Integration with well known containers such as PicoContainer and Spring

//很容易从Netty移植到mina

  • Smooth migration from Netty, an ancestor of Apache MINA.

2.分析mina框架结构和原理

MINA based Application Architecture

It's the question most asked : 'How does a MINA based application look like'? In this article lets see what's the architecture of MINA based application. Have tried to gather the information from presentations based on MINA.

A Bird's Eye View :

Here, we can see that MINA is the glue between your application (be it a client or a server) and the underlying network layer, which can be based on TCP, UDP, in-VM comunication or even a RS-232C serial protocol for a client.

You just have to design your application on top of MINA without having to handle all the complexity of the newtork layer.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值