Great response Alexey !!!! Thanks :) !!! I like Grizzly 2.0, I waited for it so many months !
I just checked .unbind() method that you added. I see that I can not specify whitch local address I want to unbind and whitch I want to leave.
So to clarify, does one TCPNIOTransport supports only one binding ??
What I see from source code (grizzly-framework-2.0.0-M1-sources.jar) we can do many bindings, each one will override serverConnection field (line : serverConnection = new TCPNIOServerConnection(this, serverSocketChannel); ). Correct me if I am wrong but is there any protection to not to override serverConnection value and to not to loose previous reference ??
And again about threads. If I want to Grizzly use as low threads as it can be I should set single thread executor (Executors.newSingleThreadExecutor) to TransportFactory.getInstance().setDefaultWorkerThreadPool(...), correct ? I hope there will be no problems that it is only one thread.
Is selector runner started for every new transport or when ?
How many selector runners will Grizzly 2.0 start if we have for example :
- three local bindings (I suppose in three different transports)
- three connections (made by special, forth transport, designated only for 'connection making')
????
Is there a way to configure Grizzly 2.0 that in this case (3 local bindings, 3 connections) it will start only one selector runner and work only on one, max two threads (one for selector runner, second as a worker thread) ?
I am waiting for response:).
Thanks :),
Arthur.