Peter,
well most blocks should be using ConnectionManager and not worrying about
getting ServerSockets themselves. I would consider any app that did that as
one that is probaby building application at too raw a level. The only Block
that should really have access to server socket factorys is
ConnecttionManager.
He he, I'm guilty of Cut and Paste development then. Take a look at
HelloWorld and bring it up to date? I'll copy that code around.
ServerSocket ( I need not tell you) is the java.net class for accepting
connections. It was at that level I was thinking of an interception.
Perhaps we could extend that class and have a series of subcasses for
it that do diferent things. Looking at the source for it, it seems that
there is even provision for custom Socket implementations.... lots of
possibilities.
possible but far too much work and far too rigid and difficult to evolve.
OK.
I think that ServerSocketFactory is the place to intercept incoming
sockets and that ConnectionManager would be untouched..... please take
another look Peter.
I disagree. Originally the "Sockets" Block (precursor to SocketManager +
ConnectionManager) was designed that way and I went to lengths to separate
them out. I then proceeded to deprecate and remove the sockets Block. So I
have done everything in my piower to move people away from that model ;)
Fine, but we still have legacy code ;-)
Pushing all this sort of thing into bottom layer defeats the purpose of
having a layered system and removes some of the flexabilities inherent in
such a system. Each time you needed to add a new feature would require
complex spiderweb coding if you were to base abstraction at ServerSocket
layer.
Enough already, you convince me :-)
Putting this in ConnectionManager layer would be far more easier to maintain
and keep consistent with user expectations. It would not be totally clean
(things like rate limiting would still require wrapping of socket) but that
is a hazard of us passing Sockets rather than streams + other parameters.
Lets do it first. I'll percolate your changes to HelloWorld...
- Paul H
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>