一、Mina框架。
Mina的框架大概是这么个样子:
底层由Java 的NIO 1.0实现 核心架构应该是这样:
内部有三个层次:
I/O Service:实际执行的 I / O ,可以选择现成的Services 如 Acceptor 也可以自己实现。
I/O Filter Chain :由多个过滤器组成的过滤器链,在这个环节将字节过滤或转换为预想的数据结构,反之亦然。
I...
分类:
其他好文 时间:
2014-08-26 21:33:16
阅读次数:
235
Linux的内置firewall机制,是通过kernel中的netfilter模块实现的(www.netfilter.ort)。Linux kernel使用netfilter对进出的数据包进行过滤,netfilter由三个规则表组成,每个表又有许多内建的链组成。通过使用iptables命令可以对这些...
分类:
系统相关 时间:
2014-08-26 16:48:26
阅读次数:
293
1.SpringHandlerInterceptor 可以组成一个chain。这个接口有三个方法:public interface HandlerInterceptor { /** * Intercept the execution of a handler. Called after...
分类:
编程语言 时间:
2014-08-26 15:24:46
阅读次数:
277
将外部请求的 80 端口转发到 8080 端口 sudo?iptables?-t?nat?-A?PREROUTING?-p?tcp?--dport?80?-j?REDIRECT?--to-port?8080 将内部使用localhost(127.0.0.1)请求的 80 端口转发到 8080 端口 sudo?...
分类:
系统相关 时间:
2014-08-26 13:52:06
阅读次数:
236
build-in命令可以查看缓存的“命令->程序路径”列表[root@localhost~]#hash
hitscommand
1/bin/hostname
1/sbin/iptables
2/usr/bin/man
1/bin/ls
1/usr/local/bin/python
分类:
系统相关 时间:
2014-08-26 11:54:56
阅读次数:
247
>___<" ~真是虚惊一场,不然又要烧掉500-600的RMB啦!PS" 相关链接:J-Link无法下载问题:http://blog.csdn.net/liyuanbhu/article/details/9107139关于调式STM32F103ZE 时出现的 JLINK 找不到CORE 问题:ht...
分类:
其他好文 时间:
2014-08-26 09:45:05
阅读次数:
1245
#!/bin/shIPT="/sbin/iptables"/bin/echo "1" > /proc/sys/net/ipv4/ip_forward/sbin/modprobe ip_tables/sbin/modprobe iptable_filter/sbin/modprobe iptable_...
分类:
其他好文 时间:
2014-08-25 22:39:44
阅读次数:
309
在虚拟机中用rhel6.5装了单机伪分布式的Hadoop,在宿主机中使用JAVA API开发程序,遇到了一些问题及解决:1、连接不上关掉iptables,最简单粗暴的方法设置策略,允许远程访问端口才是正确的解决方式,具体方式还要学习。注意:要在root下调用哦#> service iptables ...
分类:
其他好文 时间:
2014-08-24 16:34:52
阅读次数:
192
一、配置防火墙,开启80端口、3306端口CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。1、关闭firewall:systemctl stop firewalld.service #停止firewallsystemctl disable firewall...
分类:
数据库 时间:
2014-08-23 16:34:21
阅读次数:
463
在NFS客户端执行该命令时报下列错误[root@client~]#showmount-e192.168.0.1clnt_create:RPC:Portmapperfailure-Unabletoreceive:errno113(Noroutetohost)解决方法[root@server~]#iptables-F[root@server~]#iptables-X再执行该命令[root@client~]#showmount-e192.168.0.1Exportl..
分类:
移动开发 时间:
2014-08-23 02:27:20
阅读次数:
399