Java Doc for MIDletSuiteUtils.java in  » 6.0-JDK-Modules » j2me » com » sun » midp » main » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.midp.main 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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  Stringarg0ForLastMidlet
     If not null, this will be available to the last MIDlet to run as application property arg-0.
static  Stringarg0ForNextMidlet
     If not null, this will be available to the MIDlet to run as application property arg-0.
static  Stringarg1ForLastMidlet
     If not null, this will be available to the last MIDlet to run as application property arg-1.
static  Stringarg1ForNextMidlet
     If not null, this will be available to the MIDlet to run as application property arg-1.
static  Stringarg2ForNextMidlet
     If not null, this will be available to the MIDlet to run as application property arg-2.
static  intlastMidletSuiteToRun
     The unique ID of the last MIDlet suite to run.
static  StringlastMidletToRun
     The class name of the last MIDlet to run.
static  intmemoryReserved
     The minimum amount of memory guaranteed to be available to the VM at any time; < 0 if not used.
static  intmemoryTotal
     The total amount of memory that the VM can reserve; < 0 if not used.
static  intnextMidletSuiteToRun
     The unique ID of the next MIDlet suite to run.
static  StringnextMidletToRun
     The class of the next MIDlet to run.
static  intpriority
     Priority to set after restarting the VM; <= 0 if not used.
static  StringprofileName
     Name of the profile to set after restarting the VM; null if not used.


Method Summary
static  voiddisplayException(DisplayEventHandler handler, String exceptionMsg)
     Display an exception to the user.
public static  booleanexecute(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  booleanexecute(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  booleanexecuteWithArgs(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  booleanexecuteWithArgs(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  booleanexecuteWithArgs(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  booleanexecuteWithArgs(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  intgetAmsIsolateId()
     Get the Isolate ID of the AMS Isolate.
native public static  intgetIsolateId()
     Get the current Isolate ID.
public static  intgetNextMIDletSuiteToRun()
     Gets the unique storage name of the next MIDlet suite to run.
public static  StringgetNextMIDletToRun()
     Gets the name of the next MIDlet to run.
static  voidinitAmsResources()
     The method is designed to init AMS task resources.
native public static  booleanisAmsIsolate()
    
native static  voidregisterAmsIsolateId()
     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  voidsetLastSuiteToRun(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  voidvmBeginStartUp(int midletIsolateId)
    
public static  voidvmBeginStartUp(SecurityToken token, int midletIsolateId)
    
native static  voidvmEndStartUp(int midletIsolateId)
    
public static  voidvmEndStartUp(SecurityToken token, int midletIsolateId)
    

Field Detail
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.





Method Detail
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



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.