| java.lang.Object com.sun.midp.main.MIDletSuiteUtils
MIDletSuiteUtils | public class MIDletSuiteUtils (Code) | | The class designed to provide utils for starting MIDlet suites,
and scheduling their start using VM cycling mechanism.
|
Field Summary | |
static String | arg0ForLastMidlet If not null, this will be available to the last MIDlet to run as
application property arg-0. | static String | arg0ForNextMidlet If not null, this will be available to the MIDlet to run as
application property arg-0. | static String | arg1ForLastMidlet If not null, this will be available to the last MIDlet to run as
application property arg-1. | static String | arg1ForNextMidlet If not null, this will be available to the MIDlet to run as
application property arg-1. | static String | arg2ForNextMidlet If not null, this will be available to the MIDlet to run as
application property arg-2. | static int | lastMidletSuiteToRun The unique ID of the last MIDlet suite to run. | static String | lastMidletToRun The class name of the last MIDlet to run. | static int | memoryReserved The minimum amount of memory guaranteed to be available
to the VM at any time; < 0 if not used. | static int | memoryTotal The total amount of memory that the VM can reserve; < 0 if not used. | static int | nextMidletSuiteToRun The unique ID of the next MIDlet suite to run. | static String | nextMidletToRun The class of the next MIDlet to run. | static int | priority Priority to set after restarting the VM; <= 0 if not used. | static String | profileName Name of the profile to set after restarting the VM; null if not used. |
Method Summary | |
static void | displayException(DisplayEventHandler handler, String exceptionMsg) Display an exception to the user. | public static boolean | execute(int id, String midlet, String displayName) Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. | public static boolean | execute(SecurityToken securityToken, int suiteId, String midlet, String displayName) Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. | public static boolean | executeWithArgs(int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2) Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. | public static boolean | executeWithArgs(SecurityToken securityToken, int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2) Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. | public static boolean | executeWithArgs(SecurityToken securityToken, int externalAppId, int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2) Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. | public static boolean | executeWithArgs(SecurityToken securityToken, int externalAppId, int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2, int memoryReserved, int memoryTotal, int priority, String profileName) Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. | native public static int | getAmsIsolateId() Get the Isolate ID of the AMS Isolate. | native public static int | getIsolateId() Get the current Isolate ID. | public static int | getNextMIDletSuiteToRun() Gets the unique storage name of the next MIDlet suite to run. | public static String | getNextMIDletToRun() Gets the name of the next MIDlet to run. | static void | initAmsResources() The method is designed to init AMS task resources. | native public static boolean | isAmsIsolate() | native static void | registerAmsIsolateId() Register the Isolate ID of the AMS Isolate by making a native
method call that will call JVM_CurrentIsolateId and set
it in the proper native variable. | public static void | setLastSuiteToRun(int id, String midlet, String arg0, String arg1) Queues the last suite to run when there is not a next Suite
to run. | native static void | vmBeginStartUp(int midletIsolateId) | public static void | vmBeginStartUp(SecurityToken token, int midletIsolateId) | native static void | vmEndStartUp(int midletIsolateId) | public static void | vmEndStartUp(SecurityToken token, int midletIsolateId) |
arg0ForLastMidlet | static String arg0ForLastMidlet(Code) | | If not null, this will be available to the last MIDlet to run as
application property arg-0.
|
arg0ForNextMidlet | static String arg0ForNextMidlet(Code) | | If not null, this will be available to the MIDlet to run as
application property arg-0.
|
arg1ForLastMidlet | static String arg1ForLastMidlet(Code) | | If not null, this will be available to the last MIDlet to run as
application property arg-1.
|
arg1ForNextMidlet | static String arg1ForNextMidlet(Code) | | If not null, this will be available to the MIDlet to run as
application property arg-1.
|
arg2ForNextMidlet | static String arg2ForNextMidlet(Code) | | If not null, this will be available to the MIDlet to run as
application property arg-2.
|
lastMidletSuiteToRun | static int lastMidletSuiteToRun(Code) | | The unique ID of the last MIDlet suite to run.
|
lastMidletToRun | static String lastMidletToRun(Code) | | The class name of the last MIDlet to run.
|
memoryReserved | static int memoryReserved(Code) | | The minimum amount of memory guaranteed to be available
to the VM at any time; < 0 if not used.
|
memoryTotal | static int memoryTotal(Code) | | The total amount of memory that the VM can reserve; < 0 if not used.
|
nextMidletSuiteToRun | static int nextMidletSuiteToRun(Code) | | The unique ID of the next MIDlet suite to run.
|
nextMidletToRun | static String nextMidletToRun(Code) | | The class of the next MIDlet to run.
|
priority | static int priority(Code) | | Priority to set after restarting the VM; <= 0 if not used.
|
profileName | static String profileName(Code) | | Name of the profile to set after restarting the VM; null if not used.
|
displayException | static void displayException(DisplayEventHandler handler, String exceptionMsg)(Code) | | Display an exception to the user.
Parameters: handler - display event handler to draw displays Parameters: exceptionMsg - exception message |
execute | public static boolean execute(int id, String midlet, String displayName)(Code) | | Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invocation will be executed
when the current application is terminated.
Parameters: id - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke Parameters: displayName - name to display to the user true if the MIDlet suite MUST first exit before theMIDlet is run exception: SecurityException - if the caller does not have permissionto manage midlets |
execute | public static boolean execute(SecurityToken securityToken, int suiteId, String midlet, String displayName)(Code) | | Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invocation will be executed
when the current application is terminated.
Parameters: securityToken - security token of the calling classapplication manager Parameters: suiteId - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke Parameters: displayName - name to display to the user true if the MIDlet suite MUST first exit before theMIDlet is run exception: SecurityException - if the caller does not have permissionto manage midlets |
executeWithArgs | public static boolean executeWithArgs(int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2)(Code) | | Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invocation will be executed
when the current application is terminated.
Parameters: suiteId - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke Parameters: displayName - name to display to the user Parameters: arg0 - if not null, this parameter will be available to theMIDlet as application property arg-0 Parameters: arg1 - if not null, this parameter will be available to theMIDlet as application property arg-1 Parameters: arg2 - if not null, this parameter will be available to theMIDlet as application property arg-2 true if the MIDlet suite MUST first exit before theMIDlet is run exception: SecurityException - if the caller does not have permissionto manage midlets |
executeWithArgs | public static boolean executeWithArgs(SecurityToken securityToken, int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2)(Code) | | Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invocation will be executed
when the current application is terminated.
Parameters: securityToken - security token of the calling class Parameters: suiteId - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke Parameters: displayName - name to display to the user Parameters: arg0 - if not null, this parameter will be available to theMIDlet as application property arg-0 Parameters: arg1 - if not null, this parameter will be available to theMIDlet as application property arg-1 Parameters: arg2 - if not null, this parameter will be available to theMIDlet as application property arg-2 true if the MIDlet suite MUST first exit before theMIDlet is run exception: SecurityException - if the caller does not have permissionto manage midlets |
executeWithArgs | public static boolean executeWithArgs(SecurityToken securityToken, int externalAppId, int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2)(Code) | | Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invocation will be executed
when the current application is terminated.
Parameters: securityToken - security token of the calling class Parameters: externalAppId - ID of MIDlet to invoke, given by an externalapplication manager Parameters: suiteId - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke Parameters: displayName - name to display to the user Parameters: arg0 - if not null, this parameter will be available to theMIDlet as application property arg-0 Parameters: arg1 - if not null, this parameter will be available to theMIDlet as application property arg-1 Parameters: arg2 - if not null, this parameter will be available to theMIDlet as application property arg-2 true if the MIDlet suite MUST first exit before theMIDlet is run exception: SecurityException - if the caller does not have permissionto manage midlets |
executeWithArgs | public static boolean executeWithArgs(SecurityToken securityToken, int externalAppId, int suiteId, String midlet, String displayName, String arg0, String arg1, String arg2, int memoryReserved, int memoryTotal, int priority, String profileName)(Code) | | Starts a MIDlet in a new Isolate or
queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invocation will be executed
when the current application is terminated.
Parameters: securityToken - security token of the calling class Parameters: externalAppId - ID of MIDlet to invoke, given by an externalapplication manager Parameters: suiteId - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke Parameters: displayName - name to display to the user Parameters: arg0 - if not null, this parameter will be available to theMIDlet as application property arg-0 Parameters: arg1 - if not null, this parameter will be available to theMIDlet as application property arg-1 Parameters: arg2 - if not null, this parameter will be available to theMIDlet as application property arg-2 Parameters: memoryReserved - the minimum amount of memory guaranteed to beavailable to the isolate at any time; < 0 if not used Parameters: memoryTotal - the total amount of memory that the isolate canreserve; < 0 if not used Parameters: priority - priority to set for the new isolate;<= 0 if not used Parameters: profileName - name of the profile to set for the new isolate;null if not used true if the MIDlet suite MUST first exit before theMIDlet is run exception: SecurityException - if the caller does not have permissionto manage midlets |
getAmsIsolateId | native public static int getAmsIsolateId()(Code) | | Get the Isolate ID of the AMS Isolate.
Isolate ID of AMS Isolate |
getIsolateId | native public static int getIsolateId()(Code) | | Get the current Isolate ID.
ID of this Isolate. |
getNextMIDletSuiteToRun | public static int getNextMIDletSuiteToRun()(Code) | | Gets the unique storage name of the next MIDlet suite to run.
storage name of a MIDlet suite |
getNextMIDletToRun | public static String getNextMIDletToRun()(Code) | | Gets the name of the next MIDlet to run.
storage name of a MIDlet |
initAmsResources | static void initAmsResources()(Code) | | The method is designed to init AMS task resources. The resources
can be shared between all working isolates, so it is important to
init them before other isolate tasks will require the resources.
The tasks other than AMS shouldn't call this method, it's guarded
by run-time exception.
IMPL_NOTE: The method is temporarily loacated here, since we need
to introduce new abstraction for AMS task logic and separate it
from the MIDlet suite loading and execution logic. Now the method
is needed to MIDletSuiteLoader & NativeAppManagerPeer classes
which represent an AMS task for Java AMS and Native AMS cases
correspondingly.
|
isAmsIsolate | native public static boolean isAmsIsolate()(Code) | | Check whether current Isolate is an AMS Isolate
true if the current Isolate is an AMS Isolate,false otherwise. |
registerAmsIsolateId | native static void registerAmsIsolateId()(Code) | | Register the Isolate ID of the AMS Isolate by making a native
method call that will call JVM_CurrentIsolateId and set
it in the proper native variable.
|
setLastSuiteToRun | public static void setLastSuiteToRun(int id, String midlet, String arg0, String arg1)(Code) | | Queues the last suite to run when there is not a next Suite
to run. This value will be persistent until it is used.
Not used in MVM mode.
Parameters: id - ID of an installed suite Parameters: midlet - class name of MIDlet to invoke exception: SecurityException - if the caller does not have permissionto manage midlets |
vmBeginStartUp | native static void vmBeginStartUp(int midletIsolateId)(Code) | | Send hint to VM about begin of a MIDlet startup phase within specified
isolate to allow the VM to fine tune its internal parameters to achieve
optimal perfomance
Parameters: midletIsolateId - ID of the started MIDlet isolate |
vmBeginStartUp | public static void vmBeginStartUp(SecurityToken token, int midletIsolateId)(Code) | | Secure method to send VM hint about begin of a MIDlet startup phase
within specified isolate
Parameters: token - security token with the AMS permission allowed Parameters: midletIsolateId - ID of the started MIDlet isolate |
vmEndStartUp | native static void vmEndStartUp(int midletIsolateId)(Code) | | Send hint to VM about end of a MIDlet startup phase within specified
isolate to allow the VM to restore its internal parameters changed on
startup time for better performance
Parameters: midletIsolateId - ID of the started MIDlet isolate |
vmEndStartUp | public static void vmEndStartUp(SecurityToken token, int midletIsolateId)(Code) | | Secure method to send VM hint about end of a MIDlet startup phase
within specified isolate
Parameters: token - security token with the AMS permission allowed Parameters: midletIsolateId - ID of the started MIDlet isolate |
|
|