Examples of EventQueue


Examples of com.cloudera.flume.handlers.thrift.PrioritizedThriftEventSource.EventQueue

  @SuppressWarnings("serial")
  @Test
  public void testEventQueuePriority() throws InterruptedException {

    EventQueue q = new EventQueue(10) {

      {
        add(e5);
        add(e6);
        add(e1);
      }
    };

    Assert.assertEquals(q.take(), e5); // WARN
    Assert.assertEquals(q.take(), e1); // INFO
    Assert.assertEquals(q.take(), e6); // DEBUG

  }
View Full Code Here

Examples of com.sun.jdi.event.EventQueue

    for (ThreadReference threadReference : allThreads) {
      System.out.println(threadReference+" isSuspended: "+threadReference.isSuspended()+" suspendCount: "+threadReference.suspendCount());
    }

    // process events
    EventQueue eventQueue = vm.eventQueue();
    while (true) {
      EventSet eventSet = eventQueue.remove();
      for (Event event : eventSet) {
        if (event instanceof ClassPrepareEvent) {
          event.request().disable();
          installHaltPoint(vm);
        }
View Full Code Here

Examples of com.sun.jdi.event.EventQueue

  private Process process;
  ThreadReference bootThread;

  private void eventLoop() throws InterruptedException {
    System.out.println("eventLoop started");
    EventQueue eventQueue = vm.eventQueue();
    boolean isRunning = true;
    while (isRunning) {
      EventSet eventSet = eventQueue.remove();
      boolean mayResume = true;
      for (Event event : eventSet) {
        System.out.println(event);
        if (event instanceof VMDeathEvent
            || event instanceof VMDisconnectEvent) {
View Full Code Here

Examples of com.sun.midp.events.EventQueue

        event.stringParam1 = invokingClassname;
        event.intParam2 = targetSuiteId;
        event.stringParam2 = targetClassname;

        int amsIsolateId = MIDletSuiteUtils.getAmsIsolateId();
        EventQueue eventQueue = EventQueue.getEventQueue(classSecurityToken);
        eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
    }
View Full Code Here

Examples of java.awt.EventQueue

  /**
   * Initialize the event queue
   */
  public static void initializeEventQueue() {
    EventQueue waitQueue = new WaitCursorEventQueue(500);
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(waitQueue);
  }
View Full Code Here

Examples of java.awt.EventQueue

* @author Alex Ruiz
*/
public class WindowMonitor_eventQueueFor_Test extends WindowMonitor_TestCase {
  @Test
  public void should_return_EventQueue_for_Component() {
    EventQueue queue = new EventQueue();
    when(context.eventQueueFor(frame)).thenReturn(queue);
    assertThat(monitor.eventQueueFor(frame)).isSameAs(queue);
  }
View Full Code Here

Examples of java.awt.EventQueue

public class ToolkitStub extends Toolkit {
  private Map<AWTEventListener, Long> eventListeners;
  private EventQueue eventQueue;

  static ToolkitStub createNew() {
    return createNew(new EventQueue());
  }
View Full Code Here

Examples of java.awt.EventQueue

  TestWindow window;
  Context context;

  @Before
  public final void setUp() {
    eventQueue = new EventQueue();
    toolkit = newToolkitStub(eventQueue);
    window = TestWindow.createNewWindow(getClass());
    windowEventQueueMapping = mock(WindowEventQueueMapping.class);
    eventQueueMapping = mock(EventQueueMapping.class);
    createContext();
View Full Code Here

Examples of java.awt.EventQueue

    assertThat(windowMapping).isEmpty();
  }

  @Test
  public void should_remove_Component_from_all_mappings() {
    EventQueue anotherEventQueue = new EventQueue();
    Map<Window, Boolean> windowMapping = newHashMap();
    windowMapping.put(window, true);
    queueMap.put(anotherEventQueue, windowMapping);
    mapping.removeMappingFor(window);
    assertThat(windowMapping).isEmpty();
View Full Code Here

Examples of java.awt.EventQueue

*/
public class EventQueueMapping_queueFor_Test extends EventQueueMapping_TestCase {
  @Test
  public void should_return_EventQueue() {
    mapping.addQueueFor(component);
    EventQueue storedEventQueue = mapping.queueFor(component);
    assertThat(storedEventQueue).isSameAs(eventQueue);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.