users@grizzly.java.net

Re: DefaultProtocolChainInstanceHandler

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 11 Feb 2008 16:59:24 -0500

Salut,

Oleksiy Stashok wrote:
> Hi,
>
> I agree with your propose! :)
> Also think implementation could become easier if we will add
> Context.getProtocolChainInstanceHandler() like this:
>
> public ProtocolChainInstanceHandler getProtocolChainInstanceHandler() {
> ProtocolChainInstanceHandler protocolChainInstanceHandler =
> selectorHandler.getProtocolChainInstanceHandler();
> return protocolChainInstanceHandler != null ?
> protocolChainInstanceHandler :
> controller.getProtocolChainInstanceHandler();
> }
>
> This way we will have that logic just in one single place :)

+1. I will go ahead and apply :-)

A+

-- Jeanfrancois


>
> Thanks.
>
> WBR,
> Alexey.
>
> Jeanfrancois Arcand wrote:
>> Salut,
>>
>> Oleksiy Stashok wrote:
>>> Hello,
>>>
>>> IMHO to use correctly
>>> ProtocolChainInstanceHandler.offer(ProtocolChain) - we need to add
>>> one more method to ProtocolChain API:
>>> ProtocolChainInstanceHandler getInstanceHandler();
>>>
>>> as at time, when ProtocolChain could be released - we don't know from
>>> which ProtocolChainInstanceHandler the ProtocolChain was polled from.
>>> Once method above will be added to the ProtocolChain interface - we
>>> can easily implement ProtocolChain releasing in Controller's
>>> returnContext() method:
>>>
>>> public void returnContext(Context ctx){
>>> / ProtocolChain protocolChain = ctx.getProtocolChain();
>>> protocolChain.getInstanceHandler().offer(protocolChain);
>>> / contexts.offer(ctx);
>>> }
>>>
>>> What do you think?
>>
>> An alternative is to change the Controller and delegate the
>> ProtocolChain configuration to the Context (see patch). That way no
>> API changes :-)
>>
>> What do you think?
>>
>> -- Jeanfrancois
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> 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
>