Methods Summary |
---|
static com.sun.cldc.isolate.Isolate | getIsolateFromId(int id)Get the Isolate from a MIDletProxy's IsolateId
if (id > 1) {
Isolate[] isolate = Isolate.getIsolates();
for (int i = 0; i < isolate.length; i++) {
if (isolate[i].id() == id) {
return isolate[i];
}
}
}
return null;
|
public static void | minPriority(MIDletProxy mp)Set the MIDletProxy to run with the Minimum Isolate Priority
Isolate isolate = getIsolateFromId(mp.getIsolateId());
if (isolate != null) {
isolate.setPriority(Isolate.MIN_PRIORITY);
}
|
public static void | normalPriority(MIDletProxy mp)Set the MIDletProxy to run with the Normal Isolate Priority
Isolate isolate = getIsolateFromId(mp.getIsolateId());
if (isolate != null) {
isolate.setPriority(Isolate.NORM_PRIORITY);
}
|
static void | terminateMIDletIsolate(MIDletProxy mp, MIDletProxyList mpl)Terminates an isolate correspondent to the proxy given, resets
proxy termination timer and invokes proper proxy list updates.
Waits for termination completion.
Isolate isolate = getIsolateFromId(mp.getIsolateId());
if (isolate != null) {
mp.setTimer(null);
isolate.exit(0);
// IMPL_NOTE: waiting for termination completion may be useless.
isolate.waitForExit();
mpl.removeIsolateProxies(mp.getIsolateId());
}
|