net.sf.cindy
Interface SessionFilter

All Known Implementing Classes:
DispatcherFilter, LogFilter, NullFilter, PacketDecoderFilter, SessionFilterAdapter, SessionHandlerFilter, SSLFilter, StatisticFilter

public interface SessionFilter

Session filter, filter session events.

Version:
$id$
Author:
Roger Chen

Method Summary
 void exceptionCaught(SessionFilterChain filterChain, java.lang.Throwable cause)
          Session caught a exception.
 void objectReceived(SessionFilterChain filterChain, java.lang.Object obj)
          Session received a object which is decoded by PacketDecoder.
 void objectSent(SessionFilterChain filterChain, java.lang.Object obj)
          Session sent a object.
 void packetReceived(SessionFilterChain filterChain, Packet packet)
          Session received a packet.
 void packetSend(SessionFilterChain filterChain, Packet packet)
          Filter before send packet.
 void packetSent(SessionFilterChain filterChain, Packet packet)
          Session sent a packet.
 void sessionClosed(SessionFilterChain filterChain)
          Session have closed.
 void sessionStarted(SessionFilterChain filterChain)
          Session have started.
 void sessionTimeout(SessionFilterChain filterChain)
          Session timeout, but not closed.
 

Method Detail

sessionStarted

void sessionStarted(SessionFilterChain filterChain)
                    throws java.lang.Exception
Session have started.

Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

sessionClosed

void sessionClosed(SessionFilterChain filterChain)
                   throws java.lang.Exception
Session have closed.

Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

sessionTimeout

void sessionTimeout(SessionFilterChain filterChain)
                    throws java.lang.Exception
Session timeout, but not closed.

Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

packetReceived

void packetReceived(SessionFilterChain filterChain,
                    Packet packet)
                    throws java.lang.Exception
Session received a packet.

Parameters:
filterChain - session filter chain
packet - the received packet
Throws:
java.lang.Exception - any exception

objectReceived

void objectReceived(SessionFilterChain filterChain,
                    java.lang.Object obj)
                    throws java.lang.Exception
Session received a object which is decoded by PacketDecoder.

Parameters:
filterChain - session filter chain
obj - object
Throws:
java.lang.Exception - any exception

packetSend

void packetSend(SessionFilterChain filterChain,
                Packet packet)
                throws java.lang.Exception
Filter before send packet. This event will be dispatched in the reversed order.

Parameters:
filterChain - session filter chain
packet - send packet
Throws:
java.lang.Exception - any exception

packetSent

void packetSent(SessionFilterChain filterChain,
                Packet packet)
                throws java.lang.Exception
Session sent a packet. This event will be dispatched in the reversed order. The packet's position will not be updated.

Parameters:
filterChain - session filter chain
packet - the sent packet
Throws:
java.lang.Exception - any exception

objectSent

void objectSent(SessionFilterChain filterChain,
                java.lang.Object obj)
                throws java.lang.Exception
Session sent a object. This event will be dispatched in the reversed order.

Parameters:
filterChain - session filter chain
obj - the sent object
Throws:
java.lang.Exception - any exception

exceptionCaught

void exceptionCaught(SessionFilterChain filterChain,
                     java.lang.Throwable cause)
Session caught a exception.

Parameters:
filterChain - session filter chain
cause - exception