Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 28378 invoked from network); 20 May 2009 17:37:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 May 2009 17:37:46 -0000 Received: (qmail 67968 invoked by uid 500); 20 May 2009 17:37:59 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 67890 invoked by uid 500); 20 May 2009 17:37:59 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 67880 invoked by uid 99); 20 May 2009 17:37:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 17:37:59 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.44.155] (HELO yx-out-1718.google.com) (74.125.44.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 17:37:49 +0000 Received: by yx-out-1718.google.com with SMTP id 6so306816yxn.32 for ; Wed, 20 May 2009 10:37:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.130.13 with SMTP id h13mr3195793ybn.122.1242841047735; Wed, 20 May 2009 10:37:27 -0700 (PDT) Date: Wed, 20 May 2009 14:37:27 -0300 Message-ID: Subject: ProtocolEncoder/Decoder and MessageEncoder/Decoder From: =?ISO-8859-1?Q?C=E9sar_Fernando_Henriques?= To: dev@mina.apache.org Content-Type: multipart/alternative; boundary=001e680f1048299ea5046a5b7b3f X-Virus-Checked: Checked by ClamAV on apache.org --001e680f1048299ea5046a5b7b3f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have sended this msg to the users mailing list, my apologies if you are subscribed to both lists. ----------------------------------- Hi guys, I'm new to mina so pls be kind If I made silly questions. ;-) I need to create an application protocol on top of http. I have been playing with AsyncWeb and HttpRequest/Response messages and HttpCodecFactory. My questions is: Is there any way to work with HttpCodecFactory/ProtocolEncoder/ProtocolDecoder for the "low level" Http Protocol and add another ProtocolCodecFilter to encode/decode my custom messages I have been playing with Messages like AutheticationRequest/AuthenticationResponse both extends from DefaultHttpRequest/DefultHttpResponse, but I'm stuck with this error every time I call IoSession.write(DefultHttpResponse) (this just happen when I add MyCodecFactory to the FilterChain ) UnknownMessageTypeException: No message encoder found for message: org.apache.asyncweb.common.DefaultHttpResponse@3c9c31 this is my initialization code HttpCodecFactory httpCodec = new HttpCodecFactory(); acceptor.getFilterChain().addLast("httpCodec", new ProtocolCodecFilter(httpCodec)); MyCodecFactory mycodec= new MyCodecFactory (); mycodec.addMessageEncoder(AuthenticationRequest.class, AuthenticationRequestEncoder.class); mycodec.addMessageEncoder(AuthenticationResponse.class, AuthenticationResponseEncoder.class); acceptor.getFilterChain().addLast("mycodec", new ProtocolCodecFilter(mycodec)); any idea? Thank you guys! Cesar --001e680f1048299ea5046a5b7b3f--