|
Wrapping Ice.Application with Java
Hi,
I have gotten a number of Ice applications working using Java and now am trying to make a class that completely wraps all the Ice calls, thus allowing classes that do not implement Ice.Application to use Ice.
My question is about Ice.Communicator startup; is checking for communicator() != null good enough to ensure that the core us up and running?
I have a class that extends Ice.Application and in its init() it starts a thread that starts the Ice core by calling Ice.Application.main() which consists of communicator().waitForShutdown(). init() then waits until communicator() != null before exiting. At this point Ice communication can occur and other classes can use any Ice calls that it wraps.
Is this reasonable or is there some other suggested method of doing this that I am not aware of?
Thanks.
|