i wonder if there is better way to handle writes than making own selector and
doing select() loop in Filter, because it wastes 1 worker thread/client just
for looping around select() and writing output data to client. I think app
should do multiplexed writes and break 1:1 thread/client maping.
i am here:
Selector() OP_READ -> Worker thread -> Protocol filter -> request parsed, reply
is stored into Context
so i need to make 2nd controller because i cant have 2 ProtocolChainInstanceHandlers / controller and i don't think chains like ReaderFilter - something - Write filter works.
Now i need to do ?
1. switch registration of select type on channel from OP_READ to OP_WRITE
2. deregister Selection key from controller/selector
3. assign selection key to different controller