DCT Lightfoot v3 API specification

javax.microedition.midlet
Class MIDletScheduler

java.lang.Object
  |
  +--javax.microedition.midlet.MIDletScheduler

public class MIDletScheduler
extends Object

Schedules the MIDlets for running.


Field Summary
static int ACTIVE
           
static int ALL_STATES
           
static int DESTROYED
           
static int NOT_SET
           
static int PAUSED
           
static int PAUSED_AWAITING_RUN
           
 
Constructor Summary
MIDletScheduler()
           
MIDletScheduler(Vector listOfAvailableSuites)
           
 
Method Summary
static void destroyApp(MIDlet midlet, boolean unconditional)
          Provides access to the MIDlet destroyApp method
static Vector getListOfMIDlets(int states)
          Returns a list of MIDlets which match any of the given states.
static MIDlet getRunningMIDlet()
          Returns the currently running MIDlet.
static void go()
          This is the entry point for the MIDletScheduler.
static void pauseApp(MIDlet midlet)
          Provides access to the MIDlet pauseApp method
static void setDynamicClassLoader(MIDlet midlet, DynamicClassLoader cl)
          Store the DynamicClassLoader that was used to load the midlet in the associated MidletState object.
static void startApp(MIDlet midlet)
          Provides access to the MIDlet startApp method
static void updateMIDletStatus(MIDlet midlet, int state)
          Updates the state of a given MIDlet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_SET

public static final int NOT_SET
See Also:
Constant Field Values

PAUSED

public static final int PAUSED
See Also:
Constant Field Values

PAUSED_AWAITING_RUN

public static final int PAUSED_AWAITING_RUN
See Also:
Constant Field Values

ACTIVE

public static final int ACTIVE
See Also:
Constant Field Values

DESTROYED

public static final int DESTROYED
See Also:
Constant Field Values

ALL_STATES

public static final int ALL_STATES
See Also:
Constant Field Values
Constructor Detail

MIDletScheduler

public MIDletScheduler()

MIDletScheduler

public MIDletScheduler(Vector listOfAvailableSuites)
Method Detail

startApp

public static void startApp(MIDlet midlet)
                     throws MIDletStateChangeException
Provides access to the MIDlet startApp method

Parameters:
midlet - The midlet to start
MIDletStateChangeException

pauseApp

public static void pauseApp(MIDlet midlet)
Provides access to the MIDlet pauseApp method

Parameters:
midlet - The midlet to pause

destroyApp

public static void destroyApp(MIDlet midlet,
                              boolean unconditional)
                       throws MIDletStateChangeException
Provides access to the MIDlet destroyApp method

Parameters:
midlet - The midlet to destroy
MIDletStateChangeException

updateMIDletStatus

public static void updateMIDletStatus(MIDlet midlet,
                                      int state)
Updates the state of a given MIDlet. This method provides an access method for the updating of the MIDletState. The list of MIDlet States is checked through for the given MIDlet, and when found, the MIDletState object is updated accordingly.

Parameters:
midlet - The MIDlet for which the state should be updated
state - The new requested state of the MIDlet

setDynamicClassLoader

public static void setDynamicClassLoader(MIDlet midlet,
                                         DynamicClassLoader cl)
Store the DynamicClassLoader that was used to load the midlet in the associated MidletState object. This will be used when switching between midlets to allow them to load resources from the correct place.


getListOfMIDlets

public static Vector getListOfMIDlets(int states)
Returns a list of MIDlets which match any of the given states.

Parameters:
states - The list of states for which MIDlets should be returned

getRunningMIDlet

public static MIDlet getRunningMIDlet()
Returns the currently running MIDlet. Only one MIDlet should ever be running at a particular time.

Returns:
the currently running MIDlet

go

public static void go()
This is the entry point for the MIDletScheduler. After starting the MIDletResolution MIDlet, the Scheduler pends on the RUNFLAG. When a MIDlet is selected for launching by the MIDletResolution MIDlet, a notify flag is generated which prompts this Scheduler to scan through the list of available MIDlets for a MIDlet to run. When one is found, the MIDlet is launched. The list of MIDlets to run is scanned through backwards, so that the last MIDlet to be checked is the MIDletResolution MIDlet. The MIDletResolution MIDlet should always be in a state where it is able to be run.


DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification