apache mina: IoSession结构剖析

Apache MINA中的IoSession使用DefaultWriteRequestQueue和ConcurrentLinkedQueue实现写请求队列。IoSessionDataStructureFactory接口定义了获取AttributeMap和WriteRequestQueue的方法,而DefaultIoSessionDataStructureFactory类则提供了具体的实现,包括使用DefaultIoSessionAttributeMap存储属性和使用ConcurrentLinkedQueue实现的DefaultWriteRequestQueue来处理写请求。
摘要由CSDN通过智能技术生成
NioSocketSession(NioSession).<init>(IoProcessor<NioSession>, IoService, Channel)
NioSocketSession.<init>(IoService, IoProcessor<NioSession>, SocketChannel) 
NioSocketAcceptor.accept(IoProcessor<NioSession>, ServerSocketChannel)
NioSocketAcceptor.accept(IoProcessor, Object) 
AbstractPollingIoAcceptor$Acceptor.processHandles(Iterator<H>) 
AbstractPollingIoAcceptor$Acceptor.run() 


public abstract class NioSession extends AbstractIoSession {


    /** An id generator guaranteed to generate unique IDs for the session */


    private static AtomicLong idGenerator = new AtomicLong(0);

    /** The FilterChain created for this session */
    private final IoFilterChain filterChain;
  /**
     * 
     * Creates a new instance of NioSession, with its associated IoP
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值