I am using Apache Camel in conjunction with Apache Mina to have a TCP Server. I am using a specific protocol decoder in my code. In this decoder, I am waiting to get X amount of bytes before I send them downstream to the route.
I would like to implement something that is able to understand that the session got idle or closed and then send the bytes that we have already got downstream to the route (it doesn't matter if we didn't get the total X bytes). I have already tried implementing an IoFilterAdapter
overriding the method sessionIdle()
but I am not sure how to use it.