Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 89083 invoked from network); 17 Feb 2006 06:39:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Feb 2006 06:39:26 -0000 Received: (qmail 99007 invoked by uid 500); 17 Feb 2006 06:39:25 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 98957 invoked by uid 500); 17 Feb 2006 06:39:25 -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 98946 invoked by uid 99); 17 Feb 2006 06:39:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2006 22:39:25 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=RCVD_NUMERIC_HELO,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of cocoa@gmx.ch designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 16 Feb 2006 22:39:24 -0800 Received: (qmail invoked by alias); 17 Feb 2006 06:39:02 -0000 Received: from 79.40.202.62.cust.bluewin.ch (EHLO [192.168.1.4]) [62.202.40.79] by mail.gmx.net (mp020) with SMTP; 17 Feb 2006 07:39:02 +0100 X-Authenticated: #21282572 Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: <0DC9FC24-5AFC-4E95-8454-AABCA791C6D1@gmx.ch> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Apache Directory Developers List From: Simon Raess Subject: [mina] protocol implementation question Date: Fri, 17 Feb 2006 07:39:01 +0100 X-Mailer: Apple Mail (2.746.2) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi I'm trying to implement the BEEP protocol (RFC3080) on top of Mina. Now, I have several questions relating to the implementation. I've implemented a basic IoFilter that implements framing according to the BEEP protocol. The next filter is supposed to implement the transport specific mapping for TCP (RFC3081). This mapping defines a sliding window mechanism for BEEP channels. The TCP mapping filter needs to send a message back to the other side to acknowledge messages (i.e. slide the window). An IoFilter has access to the next filter. However, it does not have access to the previous filter (to send the message). I know, I could use the IoSession to send a message, but then it starts at the top of the filter chain (correct?), i.e. it passes all the filters in the chain, even the ones above the current filter (which is not really what I'd like to do). To clarify what I'd like to do: 1. TCP mapping filter receives a message 2. it determines that it should send a SEQ frame (to acknowledge the message) 3. it sends a SEQ frame (passing it to the filter below, i.e. the framing filter) The idea is basically to have a layered architecture (implemented with filters). I'm wondering whether it is "a good idea" to send messages from within the filters. Has anybody done that? Is it possible to pass a message to the previous filter when receiving messages? Or should I handle these issues in the protocol handler, possibly using IoHandlerCommand or a layered protocol handler stack? Any other suggestion, ideas? Simon