MINA源码分析---协议编码器 ProtocolEncoder

本文详细分析了MINA框架中的ProtocolEncoder接口及其相关组件,包括ProtocolEncoderOutput接口和AbstractProtocolEncoderOutput抽象类,旨在帮助读者深入理解MINA的协议编码过程。
摘要由CSDN通过智能技术生成


里面主要涉及  ProtocolEncoder接口,ProtocolEncoderOutput接口,AbstractProtocolEncoderOutput抽象类

下面的源码应该是比较容易理解的

package org.apache.mina.filter.codec;

import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;

/**
 * Encodes higher-level message objects into binary or protocol-specific data.
 * 把高层信息转换成二进制或者特定协议的数据
 * MINA invokes {@link #encode(IoSession, Object, ProtocolEncoderOutput)}
 * method with message which is popped from the session write queue, and then
 * the encoder implementation puts encoded messages (typically {@link IoBuffer}s)
 * into {@link ProtocolEncoderOutput} by calling {@link ProtocolEncoderOutput#write(Object)}.
 * <p>
 * Please refer to
 * <a href="../../../../../xref-examples/org/apache/mina/examples/reverser/TextLineEncoder.html"><code>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值