Moving the email discussion with ALR, to the forum:
> Hi Andrew,
> I was working on the JBBOOT-54 and had a few related questions:
> 1) In MCServer (impl-mc) what is the right time to expect the Kernel within the MC to be "set". Right now i see that it's being set during doStart() which is too late if someone wants to register to kernel events. I have this failing testcase (not committed) http://pastebin.com/m3979391c This fails because the kernel is not set.
Yep, I moved the bootstrap.run() and setup of the Kernel into the
initialize() method of AbstractMcServerBase.
> 2) I am bad (just learning more) at generics, this is more of a "is there a better way to do this" question - The LifecycleEventHandler has the following API:
> public void handleEvent(Server<MCServer, MCServerConfig> server, LifecycleState state) throws LifecycleEventException
> Assuming that the client registers a event handler for a MCServer event http://pastebin.com/m298f9c41is there a better was to work on a MCServer in the handleEvent method instead of doing a cast (line 26 in pastebin)? More importantly are there chances of getting a different type of server (i believe not, else it would be a bug), when the event handler was registered for MCServer?
The Lifecycle Event Handling API was stupid, because there's no need to
pass the server back into handleEvent(). So I removed this. Event
handlers that need to get at the server or Kernel (or whatever) can make
that an implementation detail supplied in the ctor, like:
Regarding your question about the generics, clearly they're wrong. And the same pattern is used in ServerInitializer. So I've got to revisit this and keep type safety (ideas welcome).
> P.S: Is there an appropriate forum (user/dev) where we could discuss such questions?
Sure, we can abuse Design of POJO Server. Mind posting your questions and my responses there?