| java.lang.Object com.sun.jump.isolate.jvmprocess.JUMPAppContainer
All known Subclasses: com.sun.jumpimpl.isolate.jvmprocess.xlet.AppContainerImpl, com.sun.jumpimpl.isolate.jvmprocess.midlet.AppContainerImpl, com.sun.jumpimpl.isolate.jvmprocess.main.AppContainerImpl, com.sun.midp.jump.isolate.MIDletContainer,
JUMPAppContainer | abstract public class JUMPAppContainer implements JUMPMessageHandler(Code) | | JUMPAppContainer defines the application container.
The container is responsible for launching the the application class
and hosts the application and handles all the JUMP Isolate related
functionality transparently to the application. It also receives
and processes application model agnostic messages.
Unless specified for a method, it is assumed that methods catch all
exceptions (but not fatal errors).
This class is extended by AppModel specific containers.
|
Constructor Summary | |
protected | JUMPAppContainer() Creates a new instance of JUMPAppContainer. |
Method Summary | |
abstract public void | destroyApp(int appId, boolean force) Signals the JUMPApplication to prepare to be terminated
by entering the Destroyed state. | public void | handleMessage(JUMPMessage message) Handle messages specific to an application model, if needed. | abstract public void | pauseApp(int appId) Signals the JUMPApplication to enter
the Paused state.
In the Paused state the JUMPApplication should
release shared resources and become quiescent. | abstract public void | resumeApp(int appId) Signals the JUMPApplication that to enter the
Active state. | abstract public int | startApp(JUMPApplication app, String[] args) Loads, initializes, and signals the JUMPApplication to
enter the Active state. |
JUMPAppContainer | protected JUMPAppContainer()(Code) | | Creates a new instance of JUMPAppContainer.
An uncheck exception can be thrown from this method to cause
the isolate to exit.
|
destroyApp | abstract public void destroyApp(int appId, boolean force)(Code) | | Signals the JUMPApplication to prepare to be terminated
by entering the Destroyed state.
When entering the state the
JUMPApplication should release all resources gracefully
and saved any persistent state, in preparation for isolate
termination.
This method may be called from the Paused or Active
states.
The method must not return until the application is has responded
to state change according the application model of the container.
If method results in destroying the last application, then this
method should call JUMPAppContainerContext.terminateIsolate
and not System.exit .
Parameters: appId - runtime ID of the application assigned by startApp Parameters: force - If true when this method is called, theJUMPApplication must cleanup and release all resources.If false the JUMPApplication may choose to ignore therequest and this method will throw an exception to indicate theapplcation was not destroyed. |
handleMessage | public void handleMessage(JUMPMessage message)(Code) | | Handle messages specific to an application model, if needed. This
message would be from a module implemented for the same application
model with a format agreed upon outside JUMP API.
Parameters: message - message from a peer |
pauseApp | abstract public void pauseApp(int appId)(Code) | | Signals the JUMPApplication to enter
the Paused state.
In the Paused state the JUMPApplication should
release shared resources and become quiescent. If the application
interfaces with the user it should still be prepared to display its
interface.
Some application models will not have the concept of Paused
state, in this case the method can be empty.
This method will only be called called when the
JUMPApplication is in the Active state.
The method must not return until the application is has responded
to state change according the application model of the container.
This method should not catch unchecked exceptions, so that caller
can report a failure back to the executive and then the executive may
issue a destroyApp request.
Parameters: appId - runtime ID of the application assigned by startApp |
resumeApp | abstract public void resumeApp(int appId)(Code) | | Signals the JUMPApplication that to enter the
Active state.
In the Active state the JUMPApplication may
hold resources.
Some application models will not have the concept of Paused
state, in this case the method can be empty.
The method will only be called when the JUMPApplication
is in the Paused state.
The method must not return until the application is has responded
to state change according the application model of the container.
This method should not catch unchecked exceptions, so that caller
can report a failure back to the executive and then the executive may
issue a destroyApp request.
Parameters: appId - runtime ID of the application assigned by startApp |
startApp | abstract public int startApp(JUMPApplication app, String[] args)(Code) | | Loads, initializes, and signals the JUMPApplication to
enter the Active state.
In the Active state the JUMPApplication may
hold resources.
The method will only be called once per application launch.
If the JUMPApplication interfaces with the user, it
expected that it will display a user interface before this method
returns.
If successful, the method must not return until the application is
considered completely initilized and active according to the
application model of the container.
Parameters: app - properties of the application to start Parameters: args - arguments to pass to the application non-negative container unique runtime ID to identify theapplication in future method calls or negative int if the applicationcan't be started |
|
|