01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26: package com.sun.midp.main;
27:
28: /**
29: * Utilities for the MIDletProxy.
30: */
31: public class MIDletProxyUtils {
32:
33: /**
34: * Set the MIDletProxy to run with the Maximum Isolate Priority
35: *
36: * @param mp MIDletProxy
37: */
38: public static void maxPriority(MIDletProxy mp) {
39: }
40:
41: /**
42: * Set the MIDletProxy to run with the Minimum Isolate Priority
43: *
44: * @param mp MIDletProxy
45: */
46: public static void minPriority(MIDletProxy mp) {
47: }
48:
49: /**
50: * Set the MIDletProxy to run with the Normal Isolate Priority
51: *
52: * @param mp MIDletProxy
53: */
54: public static void normalPriority(MIDletProxy mp) {
55: }
56:
57: /**
58: * Removes current MIDlet form the proxy list and reqests VM to stop.
59: * This results in terminating current applicaton and further re-launching
60: * VM with an AMS MIDlet (if the latter is scheduled in the main MIDP
61: * running loop).
62: *
63: * @param mp the only MIDlet proxy presenting in the system
64: * @param mpl the MIDlet proxy list
65: */
66: static void terminateMIDletIsolate(MIDletProxy mp,
67: MIDletProxyList mpl) {
68: requestVMStop();
69: }
70:
71: /**
72: * Requests VM to stop.
73: */
74: private static native void requestVMStop();
75: }
|