MIDletExecuteEventProducerpublic class MIDletExecuteEventProducer extends Object This class provides methods to send events of types
handled by MIDletExecuteEventConsumer I/F implementors.
This class completely hide event construction & sending in its methods.
The only user of this class in AppIsolateMIDletSuiteLoader in
application isolate (when no midlets & no midlet suites exist).
Generic comments for all XXXEventProducers:
For each supported event type there is a separate sendXXXEvent() method,
that gets all needed parameters to construct an event of an approprate class.
The method also performs event sending itself.
If a given event type merges a set of logically different subtypes,
this class shall provide separate methods for these subtypes.
It is assumed that only one object instance of this class (per isolate)
is created at (isolate) startup.
All MIDP stack subsystems that need to send events of supported types,
must get a reference to an already created istance of this class.
Typically, this instance should be passed as a constructor parameter.
For security reasons constructor is not public.
Use createXXXProducer(...) method,
protected by security, to create and object instance of this class
from a different package.
Class is NOT final to allow debug/profile/test/automation subsystems
to change, substitute, complement default "event sending" functionality :
Ex.
class LogXXXEventProducer
extends XXXEventProducer {
...
void sendXXXEvent(parameters) {
LOG("Event of type XXX is about to be sent ...")
super.sendXXXEvent(parameters);
LOG("Event of type XXX has been sent successfully !")
}
...
} |
Fields Summary |
---|
protected com.sun.midp.events.EventQueue | eventQueueCached reference to the MIDP event queue. | protected int | amsIsolateIdCached reference to AMS isolate ID. |
Methods Summary |
---|
public void | sendMIDletExecuteEvent(int midletExternalAppId, int midletSuiteId, java.lang.String midletClassName, java.lang.String midletDisplayName, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, int memoryReserved, int memoryTotal, int priority, java.lang.String profileName)Called to request MIDlet execution from non-AMS isolate
NEW: earlier generated by AMSUtil.executeWithArgs(...)
NativeEvent event =
new NativeEvent(EventTypes.EXECUTE_MIDLET_EVENT);
event.intParam1 = midletExternalAppId;
event.intParam2 = midletSuiteId;
event.intParam3 = memoryReserved;
event.intParam4 = memoryTotal;
event.intParam5 = priority;
event.stringParam1 = midletClassName;
event.stringParam2 = midletDisplayName;
event.stringParam3 = arg0;
event.stringParam4 = arg1;
event.stringParam5 = arg2;
event.stringParam6 = profileName;
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
|
|