FileDocCategorySizeDatePackage
ListenerTestEventQueue.javaAPI DocphoneME MR2 API (J2ME)2202Wed May 02 18:00:16 BST 2007com.sun.midp.events

ListenerTestEventQueue

public class ListenerTestEventQueue extends EventQueue
Test event queue. This queue's sendNativeEventToIsolate and post methods just call the registered event listener directly. This class is used to test the producer, listener, consumer trio of classes for an event group.

Fields Summary
Constructors Summary
Methods Summary
voiddispatch(Event event)
Dispatch the event.

param
event event to dispatch

        DispatchData dispatchData = dispatchTable[event.type - 1];

        dispatchData.listener.process(event);
    
public voidpost(Event event)
Post an event to the queue. This version just dispatches the event directly.

param
event event to post

        dispatch(event);
    
public voidsendNativeEventToIsolate(NativeEvent event, int isolateId)
Send a native event to a specific Isolate. This version just dispatches the event directly.

param
event a native event
param
isolateId ID of the receiving Isolate

        dispatch(event);