CHManagerImpl.javaAPI DocphoneME MR2 API (J2ME)4470Wed May 02 18:00:44 BST 2007com.sun.midp.content


public class CHManagerImpl extends com.sun.midp.content.CHManager implements com.sun.midp.main.MIDletProxyListListener
Handle all of the details of ContentHandlers lifecycle.

Two versions of this file exist; one which is no-op used when MIDP stack is not built with CHAPI and the real implementation when MIDP stack is BUILT with CHAPI.

Fields Summary
Constructors Summary
public CHManagerImpl()
Creates a new instance of CHManagerImpl.

Methods Summary
public voidinitCleanupMonitor(com.sun.midp.main.MIDletProxyList midletProxyList)
Setup to monitor for MIDlets starting and exiting and check for incompletely handled Invocation requests. Cleanup only occurs within the AMS Isolate. This method is only called from MIDletSuiteLoader in the AMS Isolate.

midletProxyList reference to the MIDlet proxy list

public voidmidletAdded(com.sun.midp.main.MIDletProxy midlet)
The ContentHandler monitor ignores MIDlet added callbacks. The necessary initialization is done in the Isolate and MIDletState that instantiates the MIDlet. Called when a MIDlet is added to the list and only in the AMS Isolate.

midlet The proxy of the MIDlet being added

public voidmidletInit(int suiteId, java.lang.String classname)
Notification that a MIDlet is about to be created. Set the cleanup flag on all invocations for the MIDlet.

suiteId the storage name of the MIDlet suite
classname the midlet classname

        InvocationStore.setCleanup(suiteId, classname, true);
public voidmidletRemoved(com.sun.midp.main.MIDletProxy midlet)
The ContentHandler monitor uses the MIDlet removed callback to cleanup any Invocations in an incorrect state. Called (in the AMS Isolate) when a MIDlet is removed from the list.

midlet The proxy of the removed MIDlet

        AppProxy.getCurrent().logInfo("midletRemoved: " +

        // Cleanup unprocessed Invocations
        RegistryImpl.cleanup(midlet.getSuiteId(), midlet.getClassName());

        // Check for and execute a pending MIDlet suite
public voidmidletStartError(int externalAppId, int suiteId, java.lang.String className, int errorCode, java.lang.String errorDetails)
Called when error occurred while starting a MIDlet object.

externalAppId ID assigned by the external application manager
suiteId Suite ID of the MIDlet
className Class name of the MIDlet
errorCode start error code
errorDetails start error details

public voidmidletUpdated(com.sun.midp.main.MIDletProxy midlet, int fieldId)
The ContentHandler monitor ignores MIDlet update callbacks. Called when the state of a MIDlet in the list is updated.

midlet The proxy of the MIDlet that was updated
fieldId code for which field of the proxy was updated