Hi,

I would suggest that we don't use the AttributeKey class at all, and
> instead, define each internal MINA Attribute by prefixing them with '__'.
> For instance, the SslContext would use the '__SslContext' key. The rational
> is that there is no reaon to use complex key, even if we have some
> collision risks.
>

As mentiont in ticket [DIRMINA-874] Typesafe
Attributes<https://issues.apache.org/jira/browse/DIRMINA-874>,
i think a AttributeKey is a good tool to provide typesafey and a reduced
risk of key-collisions. The most time i get confused with String
attribute-keys in MINA 2, is when some one uses a String for more than one
purpose (e.g. attribute-key & nls-key ). If we have one key-type we can
prevent users to abuse a attribute-key for an other purpose.

The idea of an '__' prefix is still possible, but i think a prefix like
'internal' is more expressive for those how don't read deep in the API-Docs.

Chris

Reply via email to