| New file | 
 |  |  | 
 |  |  | package com.dy.common.mw.channel.tcp; | 
 |  |  |  | 
 |  |  | import org.apache.mina.core.session.IoSession; | 
 |  |  |  | 
 |  |  | public interface TcpIoSessionEventCallback { | 
 |  |  | 	 | 
 |  |  |     /** | 
 |  |  |      * 网络打开 | 
 |  |  |      */ | 
 |  |  |    void sessionOpened(IoSession session) throws Exception  ; | 
 |  |  |     /** | 
 |  |  |      * 网络关闭 | 
 |  |  |      */ | 
 |  |  |    void sessionClosed(IoSession session) throws Exception  ; | 
 |  |  | 	 | 
 |  |  |    /** | 
 |  |  |      * 发生异常 | 
 |  |  |      */ | 
 |  |  |     void exceptionCaught(IoSession session, Throwable cause) throws Exception ; | 
 |  |  |      | 
 |  |  | 	 | 
 |  |  |     /** | 
 |  |  |      * 发送数据后,回调的方法,进行数据处理 | 
 |  |  |      */ | 
 |  |  |     void messageSended(IoSession session, Object message) throws Exception  ; | 
 |  |  | 	 | 
 |  |  |     /** | 
 |  |  |      * 接收到数据后,回调的方法,进行数据处理 | 
 |  |  |      */ | 
 |  |  |     void messageReceived(IoSession session, Object message) throws Exception  ; | 
 |  |  |      | 
 |  |  | } |