Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 37795 invoked from network); 15 Nov 2005 08:57:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 08:57:48 -0000 Received: (qmail 11386 invoked by uid 500); 15 Nov 2005 08:57:47 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 11258 invoked by uid 500); 15 Nov 2005 08:57:47 -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 11247 invoked by uid 99); 15 Nov 2005 08:57:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 00:57:46 -0800 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.206 as permitted sender) Received: from [64.233.184.206] (HELO wproxy.gmail.com) (64.233.184.206) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 00:57:38 -0800 Received: by wproxy.gmail.com with SMTP id 57so1182632wri for ; Tue, 15 Nov 2005 00:57:25 -0800 (PST) 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=CmGjnzqcCOV9MzHZwAJFuzJyP41pamw4yQaD9V97tXU0Vw/fivXIzDLsr687Y/wz9AjLujUhI7ASffaozq/RviAg8HaM7tV2oiDwitaEyKVh3Ti7jYcDZN6vLrAQB14Yba0Zjw8t5t7D/h4LfL1qtlHLRw8/RkxEmyZLMJwaQ9s= Received: by 10.54.67.12 with SMTP id p12mr3984953wra; Tue, 15 Nov 2005 00:57:25 -0800 (PST) Received: by 10.54.127.2 with HTTP; Tue, 15 Nov 2005 00:57:25 -0800 (PST) Message-ID: <768dcb2e0511150057he5a03adi@mail.gmail.com> Date: Tue, 15 Nov 2005 17:57:25 +0900 From: Trustin Lee To: Apache Directory Developers List Subject: Re: [mina] Refactoring MINA IoFilterChain (Was: IoFilters: DIRMINA-121 / 122) In-Reply-To: <43799C85.7010604@trillian.se> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9258_28859981.1132045045295" References: <768dcb2e0511141815o35c2d25v@mail.gmail.com> <43798E78.90803@trillian.se> <43799C85.7010604@trillian.se> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_9258_28859981.1132045045295 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 2005/11/15, Niklas Therning : > > I just realized that when calling IoSession.write() the concrete > IoSession implementation will always know the final destination of the > write event. For SocketSessionImpl the final destination is always > SocketIoProcessor. > > So the IoFilterChain methods for downstream events look like this: > > void write( IoSession session, WriteRequest writeRequest, IoProcessor p > ) throws Exception; > > SocketSessionImpl's write() method looks like this: > > public WriteFuture write( Object message ) { > this.filterChain.write(this, new WriteRequest(), > SocketIoProcesso.getInstance()); > } What is the difference from overriding the head filter of sessionmanager-level chain to call SocketIoProcessor.flush() explicitly? We can still get rid of SocketSessionManagerFilterChain without introducing a new parameter. I'll check in this change so you can see it more clearly. Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ ------=_Part_9258_28859981.1132045045295 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
2005/11/15, Niklas Therning <niklas@trillian.se>:
I just realized that when calling IoSession.write() the concrete
IoSessi= on implementation will always know the final destination of the
write ev= ent. For SocketSessionImpl the final destination is always
SocketIoProce= ssor.

So the IoFilterChain methods for downstream events look like this:<= br>
void write( IoSession session, WriteRequest writeRequest, IoProcesso= r p
) throws Exception;

SocketSessionImpl's write() method looks = like this:

public WriteFuture write( Object message ) {
   &= nbsp;this.filterChain.write(this, new WriteRequest(),
SocketIoProcesso.g= etInstance());
}

What is the difference from overri= ding the head filter of sessionmanager-level chain to call=20 SocketIoProcessor.flush() explicitly?  We can still get rid of SocketS= essionManagerFilterChain without introducing a new parameter.

I'll c= heck in this change so you can see it more clearly.

Chee= rs,
Trustin
--
what we call human nature is actually human habit
= --
http://gleamynode.net/ ------=_Part_9258_28859981.1132045045295--