You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2007/01/28 05:12:56 UTC

Re: FW: filters

Hi Kamaran,

I am sorry for responding late.

On 12/22/06, Kumaran Arul <AK...@woolworths.com.au> wrote:
>
>  Hi Trustin
>
> Congratulations on your good work. I am on a learning curve and may be you
> could help me with this. If you need code snippet, please let me know.
>
Thank you.  Please let us know whenever you have any problem with MINA.  We
always appreciate user feedback.

> I have a requirement where using filters to gunzip the request and gzip
> the response.
>
> I have my gunzip(..) logic in the messageReceived(...) callback on my
> compression fileter and where can I put mt my
>
> gzip(...) logic? I want to zip my content in the buffer prior to sending
> the response to the peer.
>
> I cannot use writeRequest(....) or messageSent(...) callbacks because by
> the time these methods are fired the response wouldHave already been sent to
> the peer.
>

You could take a look into the source code of mina-filter-compression
module.  It implemented zlib compression using IoFilter.  I think gzip
compression can be implemented similarly.

BTW, sending a message to me directly is not really a good idea because
there's a mailing list dedicated to MINA.  Please refer to this page:

http://mina.apache.org/mailing-lists.html

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6