You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by mat <fo...@gmail.com> on 2007/05/16 00:09:54 UTC

Compression and Encryption Filter

1) If I only want to compress the body part of my message (NOT head). How
could mina compression filter  be applied for this purpose?
2) If 1) answer is NO. Can I add my own compression(de-compression) filter
and encryption(de-encryption) filter? If NOT, should I do it inside the
encoder(decoder)?

Re: Compression and Encryption Filter

Posted by mat <fo...@gmail.com>.
I read the Spring AOP crossing-cutting concerns and I believe Mina filter is
similar. However, pick up another framework is a not simple job. Can you
give some comparsion about these two methods? Or maybe I compare orange with
apple?


2007/5/16, Trustin Lee <tr...@gmail.com>:
>
> On 5/16/07, mat <fo...@gmail.com> wrote:
> > You meant I could write the custom filter? Mina has this feafure?
>
> Well, there's nothing special with the out-of-the-box filters.  You
> can implement your own filter by yourself.  Just implementing IoFilter
> interface will suffice.  Please refer to various existing filter
> implementation source code bundled with MINA.
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: Compression and Encryption Filter

Posted by Trustin Lee <tr...@gmail.com>.
On 5/16/07, mat <fo...@gmail.com> wrote:
> You meant I could write the custom filter? Mina has this feafure?

Well, there's nothing special with the out-of-the-box filters.  You
can implement your own filter by yourself.  Just implementing IoFilter
interface will suffice.  Please refer to various existing filter
implementation source code bundled with MINA.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Compression and Encryption Filter

Posted by mat <fo...@gmail.com>.
You meant I could write the custom filter? Mina has this feafure?

2007/5/16, Trustin Lee <tr...@gmail.com>:
>
> On 5/16/07, mat <fo...@gmail.com> wrote:
> > 1) If I only want to compress the body part of my message (NOT head).
> How
> > could mina compression filter  be applied for this purpose?
>
> You need to compress by yourself.  There's no way to do that for now.
>
> > 2) If 1) answer is NO. Can I add my own compression(de-compression)
> filter
> > and encryption(de-encryption) filter? If NOT, should I do it inside the
> > encoder(decoder)?
>
> Either way is fine.  I'd implement it as a separate filter if the
> compression is optional, but it depends on your preference primarily.
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: Compression and Encryption Filter

Posted by Trustin Lee <tr...@gmail.com>.
On 5/16/07, mat <fo...@gmail.com> wrote:
> 1) If I only want to compress the body part of my message (NOT head). How
> could mina compression filter  be applied for this purpose?

You need to compress by yourself.  There's no way to do that for now.

> 2) If 1) answer is NO. Can I add my own compression(de-compression) filter
> and encryption(de-encryption) filter? If NOT, should I do it inside the
> encoder(decoder)?

Either way is fine.  I'd implement it as a separate filter if the
compression is optional, but it depends on your preference primarily.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6