net.sf.cindy.filter
Class NullFilter

java.lang.Object
  extended by net.sf.cindy.filter.NullFilter
All Implemented Interfaces:
SessionFilter
Direct Known Subclasses:
SessionHandlerFilter

public class NullFilter
extends java.lang.Object
implements SessionFilter

Null filter. Null-Object pattern.

Version:
$id$
Author:
Roger Chen

Constructor Summary
NullFilter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullFilter

public NullFilter()
Method Detail

exceptionCaught

public void exceptionCaught(SessionFilterChain filterChain,
                            java.lang.Throwable cause)
Description copied from interface: SessionFilter
Session caught a exception.

Specified by:
exceptionCaught in interface SessionFilter
Parameters:
filterChain - session filter chain
cause - exception

packetReceived

public void packetReceived(SessionFilterChain filterChain,
                           Packet packet)
                    throws java.lang.Exception
Description copied from interface: SessionFilter
Session received a packet.

Specified by:
packetReceived in interface SessionFilter
Parameters:
filterChain - session filter chain
packet - the received packet
Throws:
java.lang.Exception - any exception

objectReceived

public void objectReceived(SessionFilterChain filterChain,
                           java.lang.Object obj)
                    throws java.lang.Exception
Description copied from interface: SessionFilter
Session received a object which is decoded by PacketDecoder.

Specified by:
objectReceived in interface SessionFilter
Parameters:
filterChain - session filter chain
obj - object
Throws:
java.lang.Exception - any exception

packetSend

public void packetSend(SessionFilterChain filterChain,
                       Packet packet)
                throws java.lang.Exception
Description copied from interface: SessionFilter
Filter before send packet. This event will be dispatched in the reversed order.

Specified by:
packetSend in interface SessionFilter
Parameters:
filterChain - session filter chain
packet - send packet
Throws:
java.lang.Exception - any exception

packetSent

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

Specified by:
packetSent in interface SessionFilter
Parameters:
filterChain - session filter chain
packet - the sent packet
Throws:
java.lang.Exception - any exception

objectSent

public void objectSent(SessionFilterChain filterChain,
                       java.lang.Object obj)
                throws java.lang.Exception
Description copied from interface: SessionFilter
Session sent a object. This event will be dispatched in the reversed order.

Specified by:
objectSent in interface SessionFilter
Parameters:
filterChain - session filter chain
obj - the sent object
Throws:
java.lang.Exception - any exception

sessionClosed

public void sessionClosed(SessionFilterChain filterChain)
                   throws java.lang.Exception
Description copied from interface: SessionFilter
Session have closed.

Specified by:
sessionClosed in interface SessionFilter
Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

sessionStarted

public void sessionStarted(SessionFilterChain filterChain)
                    throws java.lang.Exception
Description copied from interface: SessionFilter
Session have started.

Specified by:
sessionStarted in interface SessionFilter
Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

sessionTimeout

public void sessionTimeout(SessionFilterChain filterChain)
                    throws java.lang.Exception
Description copied from interface: SessionFilter
Session timeout, but not closed.

Specified by:
sessionTimeout in interface SessionFilter
Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception