Return-Path: Delivered-To: apmail-incubator-directory-dev-archive@www.apache.org Received: (qmail 16341 invoked from network); 14 Dec 2004 04:31:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Dec 2004 04:31:15 -0000 Received: (qmail 51561 invoked by uid 500); 14 Dec 2004 04:31:15 -0000 Delivered-To: apmail-incubator-directory-dev-archive@incubator.apache.org Received: (qmail 51525 invoked by uid 500); 14 Dec 2004 04:31:14 -0000 Mailing-List: contact directory-dev-help@incubator.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 directory-dev@incubator.apache.org Received: (qmail 51511 invoked by uid 99); 14 Dec 2004 04:31:14 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ns1.zivix.com (HELO zivix.com) (66.103.225.138) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 13 Dec 2004 20:31:10 -0800 Received: (qmail 62616 invoked by uid 80); 14 Dec 2004 04:19:45 -0000 Received: from ip-69-10-113-122.cableaz.net (ip-69-10-113-122.cableaz.net [69.10.113.122]) by www.thewallacepack.net (Horde) with HTTP for ; Mon, 13 Dec 2004 23:19:45 -0500 Message-ID: <20041213231945.zrypb91lycw4gosg@www.thewallacepack.net> Date: Mon, 13 Dec 2004 23:19:45 -0500 From: Richard Wallace To: directory-dev@incubator.apache.org Subject: [seda] Sending reply on connect MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hey all, I need to be able to send a message to the client upon connection. It's a "Hi, I'm such-and-such running on suchandsuch.com and I'm ready for a transaction." I also need to send a message on disconnect, but that's easier cause that's in response to a client request. So, all I need to do in that case is first send the message then send a DisconnectEvent. The best way I can think to handle the intial message when a connection is made is to have the creator of the SEDA server subscribe to ConnectEvents. But then in that handler I'll have to handle passing the request into the decode stage (via whatever it listens for from the EventRouter). I'm afraid that I'm gonna run into the UnsupportedOperationException("only one advice supported") in DefaultEventRouter. Alex, what's the issue here. I'm not sure I entirely understand what the comment means. I would think that you just want to send the event to each of the subscribers. Not sure what the issue there is. There could be issues later, like in the case I'm talking about above. You don't want to try writing before you finish establishing the connection. Maybe the easiest way to do this is to have the TCPInputManager.registerNewConnections() method generate a something like a ConnectionEstablishedEvent. What would you all think of that? Rich ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.