mina

Mina源码阅读笔记(一)-整体解读

人走茶凉 提交于 2020-01-08 13:11:16
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 今天的这一节,将从整体上对 mina 的源代码进行把握,网上已经有好多关于 mina 源码的阅读笔记,但好多都是列举了一下每个接口或者类的方法。我倒是想从 mina 源码的结构和功能上对这个框架进行剖析。源码的阅读一般有如下几种方法:第一,根据问题读源码,这种方法可能用的最多,哪里有问题了,然后 F3 一步步点进去;第二种,专门为了读源码而读,从整体到局部,总用法到设计。第三种,可是根据软件的设计特点,根据特点逐一解读。这几篇文章主要将根据第三种方法进行阅读,因为 mina 的各个模块很有条理,而且我关注的重点也主要分布在几个核心点上,对我来说,这样的读法更合理。 Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract ·event-driven · asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO. 写过 NIO 的人都知道, NIO

apache mina 学习笔记之一:mina简介和环境搭建

夙愿已清 提交于 2020-01-08 13:07:06
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Mina简介: Apache MINA(Multipurpose Infrastructure for Network Applications) 是 Apache 组织一个较新的项目,它为开发高性能和高可用性的网络应用程序提供了非常便利的框架。当前发行的 MINA 版本支持基于 Java NIO 技术的 TCP/UDP 应用程序开发、串口通讯程序(只在最新的预览版中提供),MINA 所支持的功能也在进一步的扩展中。 Apache Mina经常用作: 1)NIO框架库 2)客户端/服务器通信框架库 3)网络Socket通信库 Apache Mina还伴随有不少子项目: 1)Asyncweb 构建于Apache Mina异步框架之上的HTTP服务器 2)FtpServer 一个FTP服务器 3)SSHd 一个Java库,支持SSHH协议 4)Vysper 一个XMPP服务器 本文将通过一个简单的问候程序 HelloServer 来介绍 MINA 的基础架构的同时演示如何使用MINA 开发网络应用程序。 环境准备 首先到官方网站下载最新的 MINA 版本,地址是:http://mina.apache.org/downloads.html。下载之前先介绍一下 MINA 的两个版本:1.0.x 适合运行环境为 JDK1

spring结合mina

北城余情 提交于 2020-01-07 16:51:04
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1) Mina入门教程(二)----Spring4 集成Mina https://www.cnblogs.com/juepei/p/3940396.html 2) spring集成mina 实现消息推送以及转发 来源: oschina 链接: https://my.oschina.net/u/2963604/blog/3154449

MINA框架

喜你入骨 提交于 2019-12-30 17:40:34
URL地址: https://blog.csdn.net/x3499633/article/details/81295608 来源: https://www.cnblogs.com/curedfisher/p/11828863.html

How To Handle Incoming Files In Apache Mina SSHD SFTP Server in Java

喜你入骨 提交于 2019-12-30 10:03:06
问题 Currently i am working on a SFTP protocol.I have created SFTP client Using Jsch Library and SFTP Server using Apache Mina Sshd library.I have made connection between them and can successfully send files to SFTP server.Now i am working on creating a SFTP server side file handler that handles the incoming files.As a example let say SFTP server can receive files from SFTP client but currently in my implementation there is no way to notify when file is arrived into server.I just go server root

How To Handle Incoming Files In Apache Mina SSHD SFTP Server in Java

故事扮演 提交于 2019-12-30 10:02:25
问题 Currently i am working on a SFTP protocol.I have created SFTP client Using Jsch Library and SFTP Server using Apache Mina Sshd library.I have made connection between them and can successfully send files to SFTP server.Now i am working on creating a SFTP server side file handler that handles the incoming files.As a example let say SFTP server can receive files from SFTP client but currently in my implementation there is no way to notify when file is arrived into server.I just go server root

Mina框架踩坑记录

荒凉一梦 提交于 2019-12-27 18:02:26
1. org.apache.mina.filter.codec.ProtocolDecoderException: java.nio.BufferOverflowException 报错 接收不到数据 原因一: 缓冲区太小 修改: connection.getSessionConfig().setReadBufferSize(1024*1024);//发送缓冲区1M connection.getSessionConfig().setReceiveBufferSize(1024*1024);//接收缓冲区1M 修改之后若仍旧报错: 检查过滤器: chain.addLast("a", new LoggingFilter()); chain.addLast("b", new ProtocolCodecFilter(new ObjectSerializationCodecFactory())); 过滤器客户端与服务端尽量保持一直,并且只能有一个过滤器。 来源: CSDN 作者: 没有胡子的猫 链接: https://blog.csdn.net/qq_39827677/article/details/103734475

Mina和Jetty,谁先谁后?

三世轮回 提交于 2019-12-27 12:39:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 这两个都是有Trustin Lee参与的框架,而且功能类似,只是Mina当前Github活跃度不高,Netty即将进入5.0版本,但是仍然要说一下,Mina出现是为了改进Netty 2.0版本的缺点。 因此,Mina出现在Netty之后。 有人想说Netty比Mina好,甚至以Netty是Mina的升级版为由来强调,这儿记录一下: http://mina.apache.org/mina-project/road-map.html 这是Trustin Lee叙说的Mina创意之初。 纯属无聊,记录一下: Genesis of MINA by Trustin Lee In June 2004, I released a network application framework, 'Netty2'. It was the first network application framework that provides event-based architecture in Java community. It attracted network application programmers because of its simplicity and ease of use. As the Netty2

Sending message to MINA socket server from Node JS Socket client

橙三吉。 提交于 2019-12-25 09:14:53
问题 I have a MENA server as follows which uses PrefixedStringCodecFactory. IoAcceptor acceptor = new NioSocketAcceptor(); acceptor.getFilterChain().addLast( "logger", new LoggingFilter() ); acceptor.getFilterChain().addLast( "codec", new ProtocolCodecFilter( new PrefixedStringCodecFactory( Charset.forName( "UTF-8" )))); acceptor.setHandler( new MinaServerHandler() ); acceptor.getSessionConfig().setReadBufferSize( 2048 ); acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );

wowza java high cpu usage

一曲冷凌霜 提交于 2019-12-24 10:38:59
问题 I have problem about cpu usage in wowza. this is doubtful thread. this thread is took high cpu. SocketAcceptorIoProcessor-1.0 prio=10 tid=0x0000002a9fb53000 nid=0x2428 runnable [0x000000004f017000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69) - locked