On 4/27/07, peter royal <[EMAIL PROTECTED]> wrote:
On Apr 25, 2007, at 2:13 AM, Trustin Lee wrote:
> Current IoFilter implementations use session attributes to store their
> internal data such as an event queue and buffers. Because the keys of
> the internal data attributes are constant, it is impossible to add the
> same IoFilter into one filter chain.
>
> We could change the current filter implementations to use session
> attributes with some common dynamic prefix. I think
> "filter.<filterName>." will suffice. With this standardized scheme,
> users will be able to add multiple filters (e.g. more than one
> ProtocolCodecFilter) easily.
>
> One problem is it involved String manipulation and therefore costs CPU
> resource though.
Compute a static string upon class construction? append the class's
hashcode to the attribute? that should make it unique.
We can do that if an IoFilter is supposed to belong to one session.
That might make more sense because most filters needs to store some
state. Is this what you thought?
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6