Package org.menacheri.jetserver.event

Examples of org.menacheri.jetserver.event.EventDispatcher.fireEvent()


        return Events.SESSION_MESSAGE;
      }
    });

    Event event = Events.event(null, Events.SESSION_MESSAGE);
    dispatcher.fireEvent(event);
    assertTrue(latch.await(1, TimeUnit.SECONDS));
  }

  @Test
  public void eventReceiptOnANYTypeEventHandler() throws InterruptedException {
View Full Code Here


        return Events.ANY;
      }
    });

    Event event = Events.event(null, Events.SESSION_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.NETWORK_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.EXCEPTION);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.LOG_IN);
View Full Code Here

    });

    Event event = Events.event(null, Events.SESSION_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.NETWORK_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.EXCEPTION);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.LOG_IN);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.CONNECT);
View Full Code Here

    Event event = Events.event(null, Events.SESSION_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.NETWORK_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.EXCEPTION);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.LOG_IN);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.CONNECT);
    dispatcher.fireEvent(event);
View Full Code Here

    event = Events.event(null, Events.NETWORK_MESSAGE);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.EXCEPTION);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.LOG_IN);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.CONNECT);
    dispatcher.fireEvent(event);

    assertTrue(latch.await(1, TimeUnit.SECONDS));
  }
View Full Code Here

    event = Events.event(null, Events.EXCEPTION);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.LOG_IN);
    dispatcher.fireEvent(event);
    event = Events.event(null, Events.CONNECT);
    dispatcher.fireEvent(event);

    assertTrue(latch.await(1, TimeUnit.SECONDS));
  }

  @Test
View Full Code Here

        return Events.SESSION_MESSAGE;
      }
    });

    Event event = Events.event(null, Events.NETWORK_MESSAGE);
    dispatcher.fireEvent(event);
    assertFalse(latch.await(1, TimeUnit.SECONDS));
  }

  @Test
  public void eventPublishingPerformance() throws InterruptedException {
View Full Code Here

      }
    });
    long startTime = System.nanoTime();
    for (int i = 1; i <= countOfEvents; i++) {
      Event event = Events.event(null, Events.SESSION_MESSAGE);
      dispatcher.fireEvent(event);
    }
    long time = System.nanoTime() - startTime;
    latch.await(10, TimeUnit.SECONDS);
    System.out.printf("Took  %.3f seconds to send %d int events",
        time / 1e9, countOfEvents);
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.