SunSPOT API V5.0


com.sun.midp.midlet
Interface MIDletTunnel


public interface MIDletTunnel

This is the interface to "tunnel" across Java package namespace, and call the protected methods in the another package namespace. The callee package will implement this interface, and provide a static utility instance to the caller package.


Method Summary
 void callDestroyApp(MIDlet m, boolean unconditional)
          Calls the destroyApp method on the midlet instance.
 void callPauseApp(MIDlet m)
          Calls the pauseApp method on the midlet instance.
 void callStartApp(MIDlet m)
          Calls the startApp method on the midlet instance.
 MIDletPeer getMIDletPeer(MIDlet m)
          Returns the MIDletPeer object corresponding to the given midlet instance.
 

Method Detail

callDestroyApp

void callDestroyApp(MIDlet m,
                    boolean unconditional)
                    throws MIDletStateChangeException
Calls the destroyApp method on the midlet instance.

Parameters:
m - MIDlet instance
unconditional - the flag to pass to destroy
Throws:
MIDletStateChangeException - is thrown if the MIDlet wishes to continue to execute (Not enter the Destroyed state). This exception is ignored if unconditional is equal to true.

callPauseApp

void callPauseApp(MIDlet m)
Calls the pauseApp method on the midlet instance.

Parameters:
m - MIDlet instance

callStartApp

void callStartApp(MIDlet m)
                  throws MIDletStateChangeException
Calls the startApp method on the midlet instance.

Parameters:
m - MIDlet instance
Throws:
MIDletStateChangeException - is thrown if the MIDlet cannot start now but might be able to start at a later time.

getMIDletPeer

MIDletPeer getMIDletPeer(MIDlet m)
Returns the MIDletPeer object corresponding to the given midlet instance.

Parameters:
m - MIDlet instance
Returns:
associated MIDletPeer instance

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.