public class MasterApplicationHolder
extends java.lang.Object
MasterApplication
.
The idea is that every jME-based view or ViewAppState
is connected to
a single MasterApplication
. There should only be one application
running at a time.Constructor and Description |
---|
MasterApplicationHolder() |
Modifier and Type | Method and Description |
---|---|
static MasterApplication |
getApplication()
Gets the single
MasterApplication responsible for rendering
all jME-based views. |
void |
setApplicationFactory(IMasterApplicationFactory factory)
Sets the factory used to create a
MasterApplication . |
void |
unsetApplicationFactory(IMasterApplicationFactory factory)
Unsets the factory used to create a
MasterApplication . |
public static MasterApplication getApplication()
MasterApplication
responsible for rendering
all jME-based views. This method creates and starts the application if
this is the first request. Views should be attached to this application
as AppState
s.MasterApplication
responsible for rendering all
jME-based views. If OSGi is not working or the bundle is not
started, this will be null.public void setApplicationFactory(IMasterApplicationFactory factory)
MasterApplication
. This
should only be called via OSGi DS!factory
- The factory that will be used to create a single
MasterApplication
.public void unsetApplicationFactory(IMasterApplicationFactory factory)
MasterApplication
. When
called, this also stops the currently available
MasterApplication
. This method is called when OSGi is
closing. This should only be called via OSGi DS!factory
- The factory that will be used to create a single
MasterApplication
.