On 11/19/07, Cam Bazz <[EMAIL PROTECTED]> wrote:
> What might be the potential uses for an IoFilter? I have read the
> tutorial on mina page, and from what I understood is when you have to
> transform events before handling to a session handler, but is this not
> what is performed by the protocol codecs?
>
> Can someone give me a real life scenario for taking advantage of a IoFilter?

Hi Cam

I'm still fairly new to MINA, but from what I understand an IoFilter
is more general than a protocol codec. This can be seen by the fact
that the ProtocolCodecFilter class implements the IoFilter interace.
The MINA distribution includes quite a few other classes that
implement the IoFilter interface. Here's a selection:

- BlacklistFilter
- CompressionFilter
- ConnectionThrottleFilter
- LoggingFilter
- ProfilerTimerFilter
- ReadThrottleFilter
- SslFilter
- TrafficShapingFilter
- WriteThrottleFilter

You can take filters and chain them together. For example, you could
set up an IoService so that its sessions would be compressed then
encrypted.

There's more info, including the full list of implementing classes on
IoFilter's Javadoc page:
http://mina.apache.org/report/trunk/apidocs/org/apache/mina/common/IoFilter.html

Hope this helps.

Rich
--
Rich Dougherty
http://www.richdougherty.com/

Reply via email to