I've implemented this feature, but some different way.
Didn't want to create 3 separate methods for get/set/remove with Level
attribute in additional to ones already existed.
So added just 1 method:
public AttributeHolder getAttributeHolderByScope(AttributeScope scope);
which will return correspondent Attribute set.
Feedback is welcome.
Thanks.
WBR,
Alexey.
Jeanfrancois Arcand wrote:
> Salut,
>
> Oleksiy Stashok wrote:
>> Hello,
>>
>> this looks as good extension.
>> We can extends Context attribute functionality.
>> What about following:
>>
>> context.setAttribute(LEVEL attrLevel, String attrName, Object attr);
>
> +1
>
>>
>> Currently I can think about following levels: Application (static),
>> Controller, SelectorHandler, Request (default).
>>
>> What do you think?
>> Think, it shouldn't be difficult to implement.
>
> +1
>
> Thanks!
>
> -- Jeanfrancois
>
>>
>> WBR,
>> Alexey.
>>
>> Radim Kolar SF.NET wrote:
>>>> Can you explain why Context.setAttribute will not works? I suspect
>>>> you want to add info once and keep it "forever"?
>>>>
>>>
>>> i think that every UDP packet gets its own Context object and
>>> attributes are
>>> declared as private, not static, so data will not be shared between
>>> different
>>> UDP packets.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>