users@grizzly.java.net

Grizzly 2.0 .unbind() , threads and filter chain

From: kermitas <kermitas_at_tlen.pl>
Date: Thu, 14 May 2009 13:11:36 +0200

Hi Alexey,

I am not good in filing issue tracker so I will write here and you can use Mr. Copy&Paste or do sth with it.

What will be interesting from my point of view :
- we have to have a possibility to 'address' local binding so my preposition is to introduce ServerConnection
- ServerConnection will have many useful methods, for example .unbind() (it should be here, not in the Transport)
- transport.bind() method returns Future<ServerConnection> (just like .connect() returns Future<Connection> )
- add events : BINDED and UNBINDED
- in methods .handleBinded() and .handleUnbinded() in FilterAdapter we can obtain ServerConnection from sth like ctx.getServerConnection()
- allow to have multiple bindings per Transport so it will be very universal (one Transport and many connections, many local bindings)

You can see that everything about ServerConnection is very similar to Connection and .handleConnected() / .handleClose() methods and that is the way I see it.
I know that you already have class called 'ServerConnection', probably you can do a little rename/refactoring since we need to have class like that for the end-client-side.

I hope you will do something in this direction, because I am not a fan of 'one binding per Transport', also added .unbind() method is very useful (thanks!) but there should be a better place for it. ServerConnection class allow to clean up all binding things in the same way as Connection do it for connections.

What you thing about it ?
If you will file an issue please post a link ;)

I am sitting in java networking last 5 years so that are my thoughts. I don't like to fight with Selector every time I want to create client-server application. I hope new Grizzly 2.0 will meet my and other programmers needs.

Best regards,
Arthur.