Multiple protocol support by Controller

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple protocol support by Controller

Kshitiz Saxena
Hi,

One question on SelectorHandler:

We can add multiple SelectorHandler associated with Controller using
addSelectorHandler(). So we can have multiple listeners for same
controller. It is ok till we have all handlers for same protocol as they
can be handled by same protocol chain. However we may need different
protocol chain, if we have handlers for different protocol. As an
example for TCP we will need ReadFilter, however for UDP we need
UDPReadFilter. Now protocol chain should be provided based on underlying
protocol. This decision need to be made in poll() method of
ProtocolChainInstanceHandler. This method does not have any argument.
Please provide inputs on how to achieve this.

Also when execute() method of filter is called, is there any way to
figure out when this call originated from TCP or UDP.

Thanks,
Kshitiz

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Multiple protocol support by Controller

Jeanfrancois Arcand-2
Hi Kshitiz,

Kshitiz Saxena wrote:

> Hi,
>
> One question on SelectorHandler:
>
> We can add multiple SelectorHandler associated with Controller using
> addSelectorHandler(). So we can have multiple listeners for same
> controller. It is ok till we have all handlers for same protocol as they
> can be handled by same protocol chain. However we may need different
> protocol chain, if we have handlers for different protocol. As an
> example for TCP we will need ReadFilter, however for UDP we need
> UDPReadFilter.

The latest version of ReadFilter works for both UDP and TCP.


Now protocol chain should be provided based on underlying
> protocol. This decision need to be made in poll() method of
> ProtocolChainInstanceHandler. This method does not have any argument.
> Please provide inputs on how to achieve this.

It would be better to use two Controller in that case, one for TCP, one
for UDP if they can't be handled by a sinfle filter.


>
> Also when execute() method of filter is called, is there any way to
> figure out when this call originated from TCP or UDP.

ctx.getProtocol() will return the current protocol executed.

Thanks

-- Jeanfrancois


>
> Thanks,
> Kshitiz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]