On 4/29/07, peter royal <[EMAIL PROTECTED]> wrote:
On Apr 27, 2007, at 3:09 AM, Trustin Lee wrote:
> On 4/27/07, peter royal <[EMAIL PROTECTED]> wrote:
>> 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?

Maybe I'm confused on what's being solved.. But we want to be able to
add multiple instances of the same IoFilter class? One of ours that
uses fixed attribute names?

Yes.  All filters use fixed attribute names IIRC.

Since a class instance will only be in a single filter chain once
(even if its used for multiple sessions), if the filter appended a
number to its attributes, such as its hashcode, that'd provide
uniqueness?

We might need to allow the same instance of IoFilter to be inserted
more than once to one filter chain, which makes hashcode useless.
Logging filter is a good example.  A user can insert the same logging
filter instance before and after the codec filter for debugging
purpose.

Hmmm... but just adding small restriction (i.e. no same filter
instances in a chain) might make things much easier.  :D

WDYT?

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

Reply via email to