In my implementation after the Methode selectedKeys() and the check for Readability if ( key.isReadable())another thread is processing the incoming Message!

My Problem is that the selectKeys()-Methode returns the already processed Key again until the Data is read from channel by the prcessing Thread !!!

I tried to remove OP_READ from the key's interest with interestOps-Methode and set it again after Thread has finishedto read the Data from Channel.The Problem with this solution is that setting the OP_READ Interest again needs (40-500 ms) and this isn't very performant!

Is there any way to read Data from Channels from another Thread (not blocking the Main-Thread so it can monitor other Key's for processing)without to change the interest's of the Key which is currently in use (for reading data) of the other Thread!

You're missing the point, I think - you're not supposed to have multiple threads - if you do that, you're slowing things down because the OS has already carefully removed the multple threadedness for you so you can handle it as a single thread.

If you're desperate to use multiple threads, you can have the main thread parse each request, and send a completed "request" object to a thread pool, and then get on with parsing the next request.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org