com.sun.midp.main

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 
com.sun.midp.main
This is root package of the MIDP runtime environment. Classes that initialize the environment, track MIDlet state and load MIDlet suites.

Runtime Environment Components

The Runtime Environment components load and run a MIDlet suite. The native interface to run a suite is contained in the file midp.h. For the Java platform, two methods were added to the MIDletSuiteStorage class. The figure below shows the dependencies of part of the AMS that load a MIDlet suite.

Detailed Design

The top level (main) files and objects of the Runtime Environment component used to launch a MIDlet are listed in the table below.

File or Object Description
midpAMS.h Provides the public C interface to start the VM and run a suite.
MIDletSuiteStorage Provides a method to create MIDletSuite objects for installed suites.
midpInit.c Initializes the system dependent resources, including the C heap, persistent storage, and UI system.
midp_run.c Implements the functionality to run a MIDlet suite. Initializes the VM including the class path, fills in the CommandState with information needed by the MIDletSuiteLoader and starts the VM with the MIDletSuiteLoader as the first class. It repeats this process as long as the CommandState contains the name of the next suite to run.
CommandState Passes state to, and receives state from, each VM run by midp_run.c
MIDletSuite Provides the methods the rest of the system requires of a MIDlet suite, such as permission checking and getting application properties. MIDletSuite is an interface.
InternalMIDletSuiteImpl Implements the MIDletSuite interface for internally ROMized MIDlets.
MIDletStateHandler Handles processing of the runtime states of the MIDlets running in an isolated runtime environment. See the com.sun.midp.midlet package for more information.
MIDletSuiteLoader Sets up the system before a suite is run. This is the first class loaded by the VM. It takes the following steps to load and run a suite:
  • Distributes security tokens to internal classes that need them
  • Initilizes packages that have background processing requirements.
  • Gets the CommandState
  • Creates a MIDletSuite object for the suite named as the next suite to run in the CommandState and then clears the name in the CommandState
  • Loads any arguments in the CommandState into the MIDlet suite's application properties as arg-0, arg-1, and arg-2, then clear the arguments in the CommandState
  • Starts the suite and put the status in the CommandState. This is a blocking action that does not return until all of the MIDlets of the suite are destroyed.
  • Gets the name of the next suite and the last suite to run from MIDletSuiteStorage and puts them in the CommandState
  • Moves the name of the last suite in the CommandState to the name of the next suite to run in the CommandState if there is no next suite to run
  • Shuts down the event queue
  • Saves the CommandState
  • Exits the VM with a special status that is different than the one for a VM abort, so midpRun.cpp knows the VM did not abort

The figure below shows the sequence of events that occur in the runtime environment when a MIDlet is launched from the Java Application Manager.

The figure below shows the sequence of events that occur in the runtime environment when a MIDlet is destroyed.

Java Source File NameTypeComment
AbstractMIDletSuiteLoader.javaClass The class presents abstract MIDlet suite loader with routines to prepare runtime environment for a suite execution.
AmsUtil.javaClass Implements utilities that are different for SVM and MVM modes.
AppIsolateMIDletSuiteLoader.javaClass The first class loaded in an application Isolate by the MIDP AMS to initialize internal security and start a MIDlet suite.
AutoDisplayController.javaClass
AutoDisplayControllerListener.javaInterface
CdcAccessControlContext.javaClass
CDCInit.javaClass Initialize the CDC environment for MIDlet execution.
CdcMIDletLoader.javaClass The class implements the MIDlet loader for the CLDC VM.
CdcMIDletSuiteLoader.javaClass The first class loaded in VM by midp_run_midlet_with_args to initialize internal security the internal AMS classes and start a MIDlet suite.
CdcPlatformRequest.java
CldcAccessControlContext.javaClass
CldcForegroundController.javaClass This class provides methods to abstract the central foreground control code from the the LCDUI library.
CldcMIDletLoader.javaClass The class implements the MIDlet loader for the CLDC VM.
CldcMIDletStateListener.javaClass The class implements the MIDlet state listener for the CLDC VM.
CldcMIDletSuiteLoader.javaClass The class presents abstract MIDlet suite loader with routines to prepare runtime environment for CLDC a suite execution.
CldcPlatformRequest.javaClass Implements platform request functionality for CLDC platform.
CommandState.javaClass Holds the state for MIDlet Suite management commands.
Configuration.javaClass access the implementation configuration file parameters.
DisplayController.javaClass This class controls which MIDlet's display is in the foreground.
DisplayControllerListener.javaInterface A listener interface for processing DisplayController events.
DummyNamsMIDlet.javaClass
DummyNamsMIDlet1.javaClass
DummyNamsMIDlet2.javaClass
DummyNamsMIDlet3.javaClass
ExecuteMIDletEventListener.javaClass Handles execute MIDlet events.
HeadlessAlert.javaClass HeadlessAlert is shown when a user selects a MIDlet to bring to the foreground that has not requested the foreground at least once by call Display.setCurrent(Displayable).
IndicatorManager.javaClass IndicatorManager is a singleton class that controls the home icon status in status bar.
IsolateMonitor.javaClass Implements the mechanism to monitor MIDlet suites isolate. The StartMIDletMonitor provides the isolate references at it gets a MIDlet create notification from the MIDletProxyList.
IsolateMonitorListener.javaInterface Class that need to be notified when suites terminate implement this interface and implementation to the Isolate monitor.
MIDletAppImageGenerator.javaClass This a class stub class to enable the com.sun.midp.installer.Installer to compile.
MIDletAppImageGeneratorBase.javaClass This class is designed to provide the functionality needed for generating the binary image from the MIDlet suite classes.
MIDletControllerEventConsumer.javaInterface This interface is to be implemnted by an event processing target for MIDlet events on MIDlet controller (i.e.
MIDletControllerEventListener.javaClass Provides initial event processing for MIDletProxyList.
MIDletControllerEventProducer.javaClass This class provides methods to send events of types handled by MIDletControllerEventConsumer I/F implementors. This class completely hide event construction & sending in its methods. This class is intended to be used by MIDletStateHandler & MIDletPeer classes in Allication Isolate. So in some of its sendXXXEvent()methods we can change int IDs to MIDletPeer references. Generic comments for all XXXEventProducers: For each supported event type there is a separate sendXXXEvent() method, that gets all needed parameters to construct an event of an approprate class. The method also performs event sending itself. If a given event type merges a set of logically different subtypes, this class shall provide separate methods for these subtypes. It is assumed that only one object instance of this class is initialized with the system event that is created at (isolate) startup.
MIDletExecuteEventProducer.javaClass This class provides methods to send events of types handled by MIDletExecuteEventConsumer I/F implementors.
MIDletProxy.javaClass Represents the state of a running MIDlet and its Display so that objects do not have to be shared across Isolates.
MIDletProxyList.javaClass Manages a list of MIDlet proxies, each proxy representing a running MIDlet and tracks which MIDlet has the foreground display, the list only available to objects running in the AMS isolate.

The list is updated upon receiving events.

MIDletProxyListListener.javaInterface A listener interface for processing MIDlet proxy list changes and additions.
MIDletProxyUtils.javaClass Utilities for the MIDletProxy.
MIDletSuiteLoader.javaClass The first class loaded in VM by midp_run_midlet_with_args to initialize internal security the internal AMS classes and start a MIDlet suite.
MIDletSuiteUtils.javaClass The class designed to provide utils for starting MIDlet suites, and scheduling their start using VM cycling mechanism.
MIDletSuiteVerifier.javaClass This a class stub class to enable the com.sun.midp.installer.Installer to compile.
MVMDisplayController.javaClass This class controls which MIDlet's display is in the foreground.
NamsAPIWrapper.javaClass A wrapper for NAMS MIDlet API.
NamsManager.javaClass Works as a simple (display) manager to test NAMS.
NamsNotifier.javaClass Works as a simple (display) manager to test NAMS.
NamsStorage.javaClass A wrapper for NAMS MIDlet API.
NamsTestService.javaClass A service for testing the Native AMS (nams).
NamsTestServiceMidlet.javaClass A midlet to start NAMS Test Service.
NativeAppManagerPeer.javaClass This is an implementation of the native application manager peer for the MVM mode of VM capable of running with more than 1 midlet concurrently.
NativeDisplayControllerPeer.javaClass This class override the MVM display manager so that requests from its parent midlet will not be given to the MVM display manager.
NativeForegroundState.javaClass This class enables the native foreground state to be changed.
RuntimeInfo.javaClass Structure containing the run time information about the midlet.
SMMDisplayController.javaClass This class controls which MIDlet's display is in the foreground.
StartMIDletMonitor.javaClass Implements the mechanism to monitor the startup of a MIDlet.
TestMIDletControllerEventProducer.javaClass Unit tests for the MIDletControllerEventProducer class.
TestNamsStartMidlet.javaClass
TrustedMIDletIcon.javaClass This holds the trusted MIDlet icon.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.