directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [mina]A small question about BlacklistFilter
Date Sun, 23 Oct 2005 01:10:23 GMT
Hi,

2005/10/22, fratre <fratre@gmail.com>:
>
> I'm browsing the code of mina-0.9.
>
> In the BlacklistFilter.java, I found it used like super.messageReceived
> (...)
> to forward event, such as:
> /**
> * Forwards event if and if only the remote address of session is not
> * blacklisted.
> */
> public void messageReceived( NextFilter nextFilter, IoSession session,
> Object message ) throws Exception
> {
> if( !isBlocked( session ) )
> {
> // forward if not blocked
> super.messageReceived( nextFilter, session, message );
> }
> }
>
> My question is: why not directly use such as nextFilter.messageReceived(
> ...) or nextFilter.sessionOpened(...)?


It is because it is same essentially. Please take a look at
IoFilterAdapter.java. :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message