Fields Summary |
---|
protected com.sun.midp.events.EventQueue | eventQueueCached reference to the MIDP event queue. |
protected int | amsIsolateIdCached reference to AMS isolate ID. |
protected int | currentIsolateIdCached reference to current isolate ID. |
final com.sun.midp.events.NativeEvent | startErrorEventPreallocate start error event to work in case of out of memory |
final com.sun.midp.events.NativeEvent | midletCreatedEventPreallocate MIDlet created event to work in case of out of memory |
final com.sun.midp.events.NativeEvent | midletActiveEventPreallocate MIDlet active event to work in case of out of memory |
final com.sun.midp.events.NativeEvent | midletPausedEventPreallocate MIDlet paused event to work in case of out of memory |
final com.sun.midp.events.NativeEvent | midletDestroyedEventPreallocate MIDlet destroyed event to work in case of out of memory |
final com.sun.midp.events.NativeEvent | midletRsPausedEventPreallocate MIDlet resources paused event to work in case of out
of memory |
Methods Summary |
---|
public void | sendDisplayBackgroundRequestEvent(int midletDisplayId)Called to send a background request event to the AMS isolate.
sendEvent(new NativeEvent(EventTypes.BACKGROUND_REQUEST_EVENT),
midletDisplayId);
|
public void | sendDisplayCreateNotifyEvent(int midletDisplayId, java.lang.String midletClassName)Called to send a Display created notification to the AMS isolate.
NativeEvent event =
new NativeEvent(EventTypes.DISPLAY_CREATED_NOTIFICATION);
event.intParam1 = currentIsolateId;
event.intParam2 = midletDisplayId;
event.stringParam1 = midletClassName;
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
|
public void | sendDisplayForegroundRequestEvent(int midletDisplayId, boolean isAlert)Called to send a foreground request event to the AMS isolate.
NativeEvent event =
new NativeEvent(EventTypes.FOREGROUND_REQUEST_EVENT);
if (isAlert) {
event.intParam2 = 1;
} else {
event.intParam2 = 0;
}
sendEvent(event, midletDisplayId);
|
public void | sendDisplayPreemptStartEvent(int midletDisplayId)Called to start preempting and end preempting.
Probably: will need more parameters, ex. MIDlet ID
NativeEvent event =
new NativeEvent(EventTypes.PREEMPT_EVENT);
event.intParam2 = -1; /* start = true */
sendEvent(event, midletDisplayId);
|
public void | sendDisplayPreemptStopEvent(int midletDisplayId)Called to start preempting and end preempting.
Probably: will need more parameters, ex. MIDlet ID
NativeEvent event =
new NativeEvent(EventTypes.PREEMPT_EVENT);
event.intParam2 = 0; /* start = false */
sendEvent(event, midletDisplayId);
|
private void | sendEvent(com.sun.midp.events.NativeEvent event, int midletDisplayId)Sends standard MIDlet controller event setting two integer parameters
for display ID and isolate ID. It is synchronized by the event to be
sent to avoid inconsistent parameters setting.
synchronized (event) {
event.intParam1 = currentIsolateId;
event.intParam4 = midletDisplayId;
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
}
|
private void | sendEvent(com.sun.midp.events.NativeEvent event, int midletSuiteId, java.lang.String midletClassName)Sends standard MIDlet controller event setting two parameters
for suite ID and class name. It is synchronized by the event to be
sent to avoid inconsistent parameters setting.
synchronized (event) {
event.intParam1 = midletSuiteId;
event.stringParam1 = midletClassName;
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
}
|
public void | sendMIDletActiveNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Called to send a MIDlet active notification to the AMS isolate.
sendEvent(midletActiveEvent, midletSuiteId, midletClassName);
|
public void | sendMIDletCreateNotifyEvent(int midletSuiteId, java.lang.String midletClassName, int midletExternalAppId, java.lang.String midletDisplayName)Called to send a MIDlet created notification to the AMS isolate.
synchronized (midletCreatedEvent) {
midletCreatedEvent.intParam1 = midletSuiteId;
midletCreatedEvent.intParam2 = currentIsolateId;
midletCreatedEvent.intParam3 = midletExternalAppId;
midletCreatedEvent.stringParam1 = midletClassName;
midletCreatedEvent.stringParam2 = midletDisplayName;
eventQueue.sendNativeEventToIsolate(midletCreatedEvent,
amsIsolateId);
}
|
public void | sendMIDletDestroyNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Called to send a MIDlet destroyed notification to the AMS isolate.
sendEvent(midletDestroyedEvent, midletSuiteId, midletClassName);
|
public void | sendMIDletDestroyRequestEvent(int midletDisplayId)Called by the display to request the central AMS to destroy the owning
MIDlet.
sendEvent(new NativeEvent(EventTypes.MIDLET_DESTROY_REQUEST_EVENT),
midletDisplayId);
|
public void | sendMIDletForegroundTransferEvent(int originMIDletSuiteId, java.lang.String originMIDletClassName, int targetMIDletSuiteId, java.lang.String targetMIDletClassName)Called to send a foreground MIDlet transfer event to the AMS isolate.
Former: NEW method, originally sent from CHAPI
NativeEvent event =
new NativeEvent(EventTypes.FOREGROUND_TRANSFER_EVENT);
event.intParam1 = originMIDletSuiteId;
event.intParam2 = targetMIDletSuiteId;
event.stringParam1 = originMIDletClassName;
event.stringParam2 = targetMIDletClassName;
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
|
public void | sendMIDletPauseNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Called to send a MIDlet paused notification to the AMS isolate.
sendEvent(midletPausedEvent, midletSuiteId, midletClassName);
|
public void | sendMIDletResumeRequest(int midletSuiteId, java.lang.String midletClassName)Called to send a MIDlet resume request to the AMS isolate.
sendEvent(new NativeEvent(EventTypes.MIDLET_RESUME_REQUEST),
midletSuiteId, midletClassName);
|
public void | sendMIDletRsPauseNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Sends notification for MIDlet resources pause to the AMS isolate.
sendEvent(midletRsPausedEvent, midletSuiteId, midletClassName);
|
public void | sendMIDletStartErrorEvent(int midletSuiteId, java.lang.String midletClassName, int midletExternalAppId, int errorCode, java.lang.String errorDetails)Notifies AMS that MIDlet creation failed
NEW: earlier it has been explicitely generated by
void static AppIsolateMIDletSuiteLoader.main(...)
synchronized (startErrorEvent) {
// use pre-created event to work in case of handling out of memory
startErrorEvent.intParam1 = midletSuiteId;
startErrorEvent.intParam2 = midletExternalAppId;
startErrorEvent.intParam3 = errorCode;
startErrorEvent.stringParam1 = midletClassName;
startErrorEvent.stringParam2 = errorDetails;
eventQueue.sendNativeEventToIsolate(startErrorEvent, amsIsolateId);
}
|
public void | sendSetForegroundByNameRequestEvent(int suiteId, java.lang.String className)Called to send a request to AMS isolate for a MIDlet be in
the foreground.
NativeEvent event =
new NativeEvent(EventTypes.SET_FOREGROUND_BY_NAME_REQUEST);
event.intParam1 = suiteId;
event.stringParam1 = className;
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
|