📄 sessionfilter.java
字号:
/****************************************************************************
* Package : com.ecSolutions.ecAppServer.server
* File : SessionFilter.java
* Create Date : 2007-7-20
* Author : Steven Chen
*
* Copyright(C) 2006 ecSolutions(shanghai) Co.,Limited.All Rights Reserved.
*
***************************************************************************/
package com.ecSolutions.ecAppServer.server;
/**
* Session filter, filter session events.
*
* @author Steven Chen
* @version $Id: SessionFilter.java,v 1.2 2007/07/26 04:10:42 stevenchen Exp $
*/
public interface SessionFilter {
/**
* Session have started.
*
* @param filterChain
* session filter chain
* @throws Exception
* any exception
*/
void sessionStarted(SessionFilterChain filterChain) throws Exception;
/**
* Session have closed.
*
* @param filterChain
* session filter chain
* @throws Exception
* any exception
*/
void sessionClosed(SessionFilterChain filterChain) throws Exception;
/**
* Session timeout, but not closed.
*
* @param filterChain
* session filter chain
* @throws Exception
* any exception
*/
void sessionTimeout(SessionFilterChain filterChain) throws Exception;
/**
* Session received a packet.
*
* @param filterChain
* session filter chain
* @param packet
* the received packet
* @throws Exception
* any exception
*/
void packetReceived(SessionFilterChain filterChain, Packet packet)
throws Exception;
/**
* Session received a object which is decoded by <code>PacketDecoder</code>.
*
* @param filterChain
* session filter chain
* @param obj
* object
* @throws Exception
* any exception
*/
void objectReceived(SessionFilterChain filterChain, Object obj)
throws Exception;
/**
* Filter before send packet. This event will be dispatched in the reversed
* order.
*
* @param filterChain
* session filter chain
* @param packet
* send packet
* @throws Exception
* any exception
*/
void packetSend(SessionFilterChain filterChain, Packet packet)
throws Exception;
/**
* Session sent a packet. This event will be dispatched in the reversed
* order. The packet's position will not be updated.
*
* @param filterChain
* session filter chain
* @param packet
* the sent packet
* @throws Exception
* any exception
*/
void packetSent(SessionFilterChain filterChain, Packet packet)
throws Exception;
/**
* Session sent a object. This event will be dispatched in the reversed
* order.
*
* @param filterChain
* session filter chain
* @param obj
* the sent object
* @throws Exception
* any exception
*/
void objectSent(SessionFilterChain filterChain, Object obj)
throws Exception;
/**
* Session caught a exception.
*
* @param filterChain
* session filter chain
* @param cause
* exception
*/
void exceptionCaught(SessionFilterChain filterChain, Throwable cause);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -