On 09/28/2009 09:44 PM, Jeanfrancois Arcand wrote:
> Salut,
>
> Tigran Mkrtchyan wrote:
>>
>> Hi,
>>
>> short question: how can I distinguish between TCP and UDP inside
>> protocolParser?
>
> Interesting question. I think the easiest way is to:
>
> (1) override public boolean execute(Context ctx) from
> ParserProtocolFilter and locally store the result of ctx.getProtocol()
> as WorkerThread.getAttachement().setAttribute(...) or a ThreadLocal.
Oh, I can simply add yet another filter in the chain which will do it.
Sound's like interface breaking, I think you need to propagate it
down to parser.
Regards,
Tigran.
> (2) Inside the newProtocolParser(), retrieve that value.
>
> Does that help?
>
> A+
> -- Jeanfrancois
>>
>> Thanks,
>> Tigran.
>>
>> ---------------------------------------------------------------------
>> 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
>