| java.lang.Object com.sun.midp.main.MIDletExecuteEventProducer
MIDletExecuteEventProducer | public class MIDletExecuteEventProducer (Code) | | 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 !")
}
...
}
|
Field Summary | |
protected int | amsIsolateId Cached reference to AMS isolate ID. | protected EventQueue | eventQueue Cached reference to the MIDP event queue. |
Method Summary | |
public void | sendMIDletExecuteEvent(int midletExternalAppId, int midletSuiteId, String midletClassName, String midletDisplayName, String arg0, String arg1, String arg2, int memoryReserved, int memoryTotal, int priority, String profileName) |
amsIsolateId | protected int amsIsolateId(Code) | | Cached reference to AMS isolate ID.
|
eventQueue | protected EventQueue eventQueue(Code) | | Cached reference to the MIDP event queue.
|
MIDletExecuteEventProducer | public MIDletExecuteEventProducer(SecurityToken token, EventQueue theEventQueue, int theAmsIsolateId)(Code) | | Construct a new MIDletExecuteEventProducer.
Parameters: token - security token that controls instance creation. Parameters: theEventQueue - An event queue where new events will be posted. Parameters: theAmsIsolateId - AMS Isolate Id |
sendMIDletExecuteEvent | public void sendMIDletExecuteEvent(int midletExternalAppId, int midletSuiteId, String midletClassName, String midletDisplayName, String arg0, String arg1, String arg2, int memoryReserved, int memoryTotal, int priority, String profileName)(Code) | | Called to request MIDlet execution from non-AMS isolate
NEW: earlier generated by AMSUtil.executeWithArgs(...)
Parameters: midletExternalAppId - ID of MIDlet to invoke, given by an externalapplication manager Parameters: midletSuiteId - ID of an installed suite Parameters: midletClassName - class name of MIDlet to invoke Parameters: midletDisplayName - name to display to the user Parameters: arg0 - if not null, this parameter will be available to theMIDlet as application property arg-0 Parameters: arg1 - if not null, this parameter will be available to theMIDlet as application property arg-1 Parameters: arg2 - if not null, this parameter will be available to theMIDlet as application property arg-2 Parameters: memoryReserved - the minimum amount of memory guaranteed to beavailable to the isolate at any time; < 0 if not used Parameters: memoryTotal - the total amount of memory that the isolate canreserve; < 0 if not used Parameters: priority - priority to set for the new isolate;<= 0 if not used Parameters: profileName - name of the profile to set for the new isolate;null if not used |
|
|