时间:2021-07-01 10:21:17 帮助过:3人阅读
你可以继承IoAdapter代替直接实现的IoFilter,除非重写,否则任何接受到的事件都会被通过下面的filter:
public class MyFilter extends IoFilterAdapter { @Override public void sessionOpened(NextFilter nextFilter, IoSession session) throws Exception { // Some logic here... nextFilter.sessionOpened(session); // Some other logic here... } }
Transforming a Write Request
Be Careful When Filtering sessionCreated Event
Watch out the Empty Buffers!
以上就是 Apache Mina 学习笔记(4) - Filters的内容,更多相关内容请关注PHP中文网(www.gxlcms.com)!