com.sun.midp.midletsuite

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.midletsuite 
com.sun.midp.midletsuite
An internal API for installing, loading, and removing MIDlet suites.

MIDlet Suite Storage

The MIDlet Suite Storage component is responsible for the following:

  • Persistently stores MIDlet suites
  • Manages all the MIDlet suites' information
  • Provides a way to load a MIDlet

Each MIDlet suite in persistent storage (each installed MIDlet suite) is uniquely identified by a storage name constructed from the combination of the values of the MIDlet-Name and MIDlet-Vendor attributes. The syntax and content of storage names are implementation dependent. Only packages installed or upgraded using this API appear in the list of known packages.

Managing a MIDlet suite's information means storing any data that is received or created during installation, and removing all the data when the MIDlet suite is removed. This component uses the native persistent storage services of the platform, and must be ported to different platforms.

Detailed Design

The MIDlet suite storage component has a C interface and a secure Java platform interface. The C interface is in the file suitestore_common.h. The Java platform interface is MIDletSuiteStorage.

The default implementation is in the file suitestore_intern.c, which use midpStorage.c and rms.c. The figure below shows the MIDlet suite storage component's dependencies.

The MIDlet Suite Storage component provides the following services to both Java platform and native components:

  • Provides a suite's unique identifier, given the name and vendor of the suite
  • Creates a unique identifier for a suite, given its name and vendor
  • Provides the total amount of persistent storage used by a suite
  • Provides the amount of storage available for a suite to be installed
  • Adds a MIDlet suite to the MIDlet suite storage, or updates an existing MIDlet suite. This service is designed to handle system-specific installation actions
  • Removes a MIDlet suite from the MIDlet suite storage. This service is designed to handle system-specific uninstall actions
  • Provides the installation information for a MIDlet suite such as the URL of its JAD file
  • Provides the application-specific properties of a MIDlet suite such as its name, vendor, and version
  • Provides the current permissions for a suite
  • Updates the current permissions for a suite
  • Provides the Push interrupt setting for a suite
  • Updates the Push interrupt setting for a suite
  • Provides a list of the unique identifiers of all the installed MIDlet suites
  • Provides a list of delete-notification URLs for OTA installers
  • Adds a URL to the list of delete-notification URLs
  • Removes a URL from the list of delete-notification URLs

To avoid creating a class for only a few runtime environment services, the MIDletSuiteStorage class provides the following functionality:

  • Sets the next suite to run after the current suite ends
  • Sets the last suite to run after there is no current suite to run
  • Gets a MIDletSuite object for scheduling a suite to run

See the com.sun.midp.main package for more information.

Unique Suite IDs

MIDlet suites are identified globally by their name, vendor, and version. Because there can only be one version of a suite on a device at time, the name and vendor can be used to identify a MIDlet suite. However, it saves a lot of code if a MIDlet suite can be uniquely identified with only one value, a value that can be used in ASCII files. The MIDlet suite storage component gives each MIDlet suite a device-unique ASCII string of a arbitrary length that cannot be used for another suite, even after the suite is deleted.

An implementation of the MIDlet suite storage component MAY internally use the unique identifier as part of a file name, none of the other AMS components use the identifier to access MIDlet suite storage files directly.

File Storage

The MIDlet Suite Storage component assumes the file system is one large repository. It also assumes that file names can be of arbitrary length and can be made up of any printable ASCII characters. Using these assumptions, the component builds file names by appending the following three strings, without directory separators:

  • Application database root ­ Enables the files in the MIDlet suite storage area to be distinguished from other files in the system. This string can be missing (zero characters long) if the feature is not needed. It can also be a directory name that ends with a directory separator.
  • Unique suite root ­ Identifies the MIDlet suite. This string is found by using a function that takes the unique ID of a suite.
  • File extension ­ Identifies the file's contents

Java Source File NameTypeComment
InstallInfo.javaClass Information about a MIDlet that is to be installed.
MIDletInfo.javaClass Simple attribute storage for MIDlets in the descriptor/manifest.
MIDletSuiteCorruptedException.javaClass
MIDletSuiteInfo.javaClass
MIDletSuiteLockedException.javaClass
MIDletSuiteStorage.javaClass This class manages the persistent data for MIDlet suites.
SuiteProperties.javaClass The properties for the suite.
SuiteSettings.javaClass The settings for the suite.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.