FileDocCategorySizeDatePackage
SuspendTimer.javaAPI DocphoneME MR2 API (J2ME)2409Wed May 02 18:00:10 BST 2007com.sun.midp.suspend

SuspendTimer

public class SuspendTimer extends Timer
Timer for terminating MIDlets that have not completed their pase routines within suspend timeout.

Fields Summary
private static final long
TIMEOUT
The timeout within which MIDlets have chance to complete.
private static SuspendTimer
timer
The only instance of suspend timer.
private static TimerTask
task
Current timer task.
Constructors Summary
private SuspendTimer()
Constructs an instance.


            
      
Methods Summary
static synchronized voidstart(com.sun.midp.main.MIDletProxyList midletList)
Schedules standard MIDlets termination task to sandard timeout.

param
midletList the MIDlet proxy list

        if (null == task) {
            task = new TimerTask() {
                public void run() {
                    midletList.terminatePauseAll();
                }
            };

            timer.schedule(task, TIMEOUT);
        }
    
static synchronized voidstop()
Cancels the timer.

        task.cancel();
        task = null;