Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 41998 invoked from network); 23 Oct 2005 01:10:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Oct 2005 01:10:46 -0000 Received: (qmail 20524 invoked by uid 500); 23 Oct 2005 01:10:45 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 20457 invoked by uid 500); 23 Oct 2005 01:10:45 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 20446 invoked by uid 99); 23 Oct 2005 01:10:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2005 18:10:44 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of trustin@gmail.com designates 64.233.184.204 as permitted sender) Received: from [64.233.184.204] (HELO wproxy.gmail.com) (64.233.184.204) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2005 18:10:43 -0700 Received: by wproxy.gmail.com with SMTP id i21so373821wra for ; Sat, 22 Oct 2005 18:10:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=GtsNcroLTbyHYXpoEipiNvi6GQUEHLFEImo5ckhpkptq5th/QXc1HRG3ve3DdZKlX1abqv6IRZ3E1MHANLLNphkGBLqqV8nvfIYOt8rMPuVy693bMi+9aPJkCXtdc6D91OBeDqI5kdYNWj0G0ty0X0tCHjfNmtNKQu1KUk9fVPg= Received: by 10.54.143.8 with SMTP id q8mr697208wrd; Sat, 22 Oct 2005 18:10:23 -0700 (PDT) Received: by 10.54.71.11 with HTTP; Sat, 22 Oct 2005 18:10:23 -0700 (PDT) Message-ID: <768dcb2e0510221810j1288ac05n@mail.gmail.com> Date: Sun, 23 Oct 2005 10:10:23 +0900 From: Trustin Lee To: Apache Directory Developers List Subject: Re: [mina]A small question about BlacklistFilter In-Reply-To: <20051022103907.5A26.FRATRE@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21191_31284295.1130029823250" References: <20051022103907.5A26.FRATRE@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_21191_31284295.1130029823250 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, 2005/10/22, fratre : > > 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/ ------=_Part_21191_31284295.1130029823250 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,

2005/10/22, fratre <fratre@gmail.com>:
I'm browsing the code of mina-0.9.

In the BlacklistFilter.java, I fo= und it used like super.messageReceived(...)
to forward event, such as:    /**
     * Forwards event = if and if only the remote address of session is not
     * blacklisted.
     */<= br>    public void messageReceived( NextFilter nextFilt= er, IoSession session,
        &= nbsp;           &nbs= p;            Object= message ) throws Exception
    {
  &nb= sp;     if( !isBlocked( session ) )
        {
   =          // forward if not blo= cked
           &= nbsp;super.messageReceived( nextFilter, session, message );
  =       }
    }

M= y question is: why not directly use such as nextFilter.messageReceived (
...) or nextFilter.sessionOpened(...)?

It is beca= use it is same essentially.  Please take a look at IoFilterAdapter.jav= a. :)

Trustin
--
what we call human nature is act= ually human habit
--
http://gleamynode.net/ ------=_Part_21191_31284295.1130029823250--