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

StubEventQueue

public class StubEventQueue extends EventQueue
This is a stubbed-out version of EventQueue, for testing purposes.

Fields Summary
Vector
eventLog
Constructors Summary
public StubEventQueue()
Constructs an stub event queue.

        eventLog = new Vector();
    
Methods Summary
public Event[]getEventLog()
Gets the set of logged events.

        Event[] arr = new Event[eventLog.size()];
        eventLog.copyInto(arr);
        return arr;
    
public voidpost(Event event)
Post an event to the queue. The reference to the event will be put in the queue without copying, so the caller should not reuse events passed to this method.

param
event event to post

        eventLog.addElement(event);
    
public voidsendNativeEventToIsolate(NativeEvent event, int isolateId)
Send a native event to a specific Isolate.

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

        eventLog.addElement(event);
        // IMPL_NOTE: keep track of isolateId somehow