Examples of MIDletSuite


Examples of com.sun.midp.midlet.MIDletSuite

     * @param proxyPassword if not null, it will be put in the post
     */
    public static void postInstallMsgBackToProvider(String message,
            MIDletSuite suite, String proxyUsername, String proxyPassword) {
        String url;
        MIDletSuite callingMidletSuite =
            MIDletStateHandler.getMidletStateHandler().getMIDletSuite();

        if (callingMidletSuite == null) {
            throw new IllegalStateException("This method can't be called " +
                "before a suite is started.");
        }

        callingMidletSuite.checkIfPermissionAllowed(Permissions.AMS);

        // Now, send out install notifications
        url = suite.getProperty(NOTIFY_PROP);
        try {
            postMsgBackToProvider(message, url, proxyUsername, proxyPassword);
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     * @return array of connection strings, where each connection is
     *       represented by the generic connection <em>protocol</em>,
     *       <em>host</em> and <em>port number</em> identification
     */
    public static String [] listConnections(final boolean available) {
        final MIDletSuite midletSuite = getMIDletSuite();
        if (midletSuite == null) {
            return null;
        }

        return ConnectionRegistry.listConnections(midletSuite, available);
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

    public static long registerAlarm(
            final String midlet,
            final long time)
            throws ClassNotFoundException, ConnectionNotFoundException {

        final MIDletSuite midletSuite = getMIDletSuite();
        if (midletSuite == null) {
            throw new IllegalStateException("Not in a MIDlet context");
        }

        checkMidlet(midletSuite, midlet);
        try {
            midletSuite.checkForPermission(Permissions.PUSH, null);
        } catch (InterruptedException ie) {
            throw new RuntimeException(
                "Interrupted while trying to ask the user permission");
        }
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     * @return array of the names of record stores owned by the
     * MIDlet suite. Note that if the MIDlet suite does not
     * have any record stores, this function will return null.
     */
    public static String[] listRecordStores() {
        MIDletSuite currentSuite =
            MIDletStateHandler.getMidletStateHandler().getMIDletSuite();

        if (currentSuite == null) {
            return null;
        }

        // static calls synchronize on openRecordStores
        synchronized (openRecordStores) {
      return RecordStoreImpl.listRecordStores(
                classSecurityToken, currentSuite.getID());
  }
    }
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     * @throws SecurityException if access is restricted by ACL
     */
    public Connection openPrim(String name, int mode, boolean timeouts)
            throws IOException {

        MIDletSuite midletSuite =
            MIDletStateHandler.getMidletStateHandler().getMIDletSuite();

        try {
            midletSuite.checkForPermission(Permissions.JCRMI_CONNECTION, null);
        } catch (InterruptedException ie) {
            throw new InterruptedIOException(
                "Interrupted while trying to ask the user permission");
        }

View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

            throws IOException {

        if (securityToken == null) {
            MIDletStateHandler midletStateHandler =
                MIDletStateHandler.getMidletStateHandler();
            MIDletSuite midletSuite = midletStateHandler.getMIDletSuite();

            midletSuite.checkIfPermissionAllowed(Permissions.AMS);
        } else {
            securityToken.checkIfPermissionAllowed(Permissions.AMS);
        }

        if (entryName.charAt(0) == '/') {
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     */
    public static CHManager getManager(SecurityToken token) {
        if (token != null) {
            token.checkIfPermissionAllowed(Permissions.MIDP);
        } else {
            MIDletSuite msuite =
                MIDletStateHandler.getMidletStateHandler().getMIDletSuite();
            if (msuite != null) {
                msuite.checkIfPermissionAllowed(Permissions.AMS);
            }
        }

  if (manager == null) {
      try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.