I am wondering when building my server… Any reason not to put StandardGame's DefaultUncaughtExceptionHandler into the StandardGame body itself and make it an inner class? This would allow to make the cleanup() and quit() methods private - as they should not really be called from outside anyway? Or would this in some way break down the way DefaultUncaughtExceptionHandler works? I am a bit fuzzy about what happens on thread termination…
Thanks
I don't see why it can't be put as a private inner class. The J2SE docs explain how A Thread.UncaughtExceptionHandler works. Basically, the exception handler is invoked when a thread is about to terminate do to an uncaught exception. The exception handler can't prevent the thread from terminating, but code can be inserted to log it and do any cleanup, which is done in standard game. The "cleanup" and "quit" methods can't be private since they are declared protected in AbstractGame, but they are still declared protected in StandardGame so can't be called by outside classes anyways.
Well I was thinking about it only for my game server… it is not extending AbstractGame so for me it would work… But yeah, I missed the protected keywords
Thanks for answering…
[me=dhdd]summons the frog[/me]
I don't have any code in front of me and it's been quite a while since I've looked at that code, but I believe I tried to separate it from StandardGame so other systems could use it as well and not be limited to StandardGame.
:-o
summoning the frog always works … is it magic? :?
dark magic.