New file |
| | |
| | | package com.dy.common.mw.channel.tcp; |
| | | |
| | | import com.dy.common.mw.UnitAdapterInterface; |
| | | |
| | | public interface TcpUnitAdapter extends UnitAdapterInterface { |
| | | |
| | | /** |
| | | * 得到配置 |
| | | * @return |
| | | */ |
| | | TcpConfigVo getConfig() ; |
| | | /** |
| | | * mina实现的TCP NIO,采用了线程池技术,存在线程安全问题, |
| | | * 所以此处得到PrefixedDataAvailableHandle不能是单例, |
| | | * @return |
| | | */ |
| | | PrefixedDataAvailableHandle newPrefixedDataAvailableHandle() ; |
| | | |
| | | /** |
| | | * mina实现的TCP NIO,采用了线程池技术,存在线程安全问题, |
| | | * 所以此处得到TcpSessionEventCallback不能是单例, |
| | | * @return |
| | | */ |
| | | TcpIoSessionEventCallback newSessionEventCallback() ; |
| | | |
| | | /** |
| | | * 模块停止时的回调 |
| | | */ |
| | | TcpUnitStopCallback newUnitStopCallback() ; |
| | | |
| | | } |