Hi,
right now using a TCP|UDPConnectorHandler with a CallbackHandler, it is
impossible to invoke the Pipeline and its associated ProtocolChain. Some
protocol (like SIP) are two ways protocol and they need to be able, from
the TCP|UDPConnectorHandler to be able to invoke their ProtocolFilter
from this object. Hence I've made the following changes:
+ Context: added an execute() method which under the hood invoke the
Pipeline. I've also added a getCurrentOpType() so you can find if the
context was called for an OP_READ|WRITE or Connect.
+ UPD|TCPSelectorHandler now pushes an IOEvent<Context> instead of
IOEvent<SelectionKey>
Now from a CallbackHandler it is now possible to do something like:
> public void onRead(IOEvent<Context> ioEvent) {
> ioEvent.attachment().execute();
which means the ProtocolChain will be invoked and all its associated
ProtocolFilter using the SelectionKey that was ops ready.
Please review and let me know if you think this is not a good idea. I
will soon commit a new unit test that demonstrate the feature.
Thanks
-- Jeanfrancois