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

Invoker

public class Invoker extends javax.microedition.midlet.MIDlet implements Runnable
The tool for start given Content Handler from the platform.

Fields Summary
Registry
r
Constructors Summary
public Invoker()
Default constructor.

        r = Registry.getRegistry(this.getClass().getName());
        new Thread(this).start();
    
Methods Summary
protected voiddestroyApp(boolean unconditional)
Standard MIDlet life-cycle call-back.

    
private InvocationgetNativeInvocation()
Loads Invocation parameters. According current implementation Invocation parameters consist of , and command line arguments provided for this MIDlet.

        String id = getAppProperty("arg-0");
        String url = getAppProperty("arg-1");
        String action = getAppProperty("arg-2"); /* optional */
        String type = null;
        boolean responseRequired = false;

        return new Invocation(url, type, id, responseRequired, action);
    
protected voidpauseApp()
Standard MIDlet life-cycle call-back.

    
public voidrun()
Actual handler invoking is performed in the separated thread.

        Invocation i = getNativeInvocation();
        try { 
            r.invoke(i);
        } catch (Throwable t) {
            Logging.report(Logging.ERROR, LogChannels.LC_AMS,
                "Exception during invoking native invocation: " + t);
        }
        notifyDestroyed();
    
protected voidstartApp()
Standard MIDlet life-cycle call-back.