Package org.asmatron.messengine.engines

Examples of org.asmatron.messengine.engines.DefaultEventDelegate$ListenerRunner


  @Test
  public void shouldTestEventEngine() throws Exception {
    final AtomicBoolean invoked = new AtomicBoolean(false);

    DefaultEventDelegate engine = new DefaultEventDelegate();

    engine.addListener(aType, new Listener<CustomEvent>() {
      @Override
      public void handleEvent(CustomEvent eventArgs) {
        invoked.set(true);
      }

      @Override
      public EventExecutionMode getMode() {
        return EventExecutionMode.NORMAL;
      }

      @Override
      public boolean isEager() {
        return false;
      }
    });

    engine.fireEvent(aType, new CustomEvent());
    assertTrue(invoked.get());
  }
View Full Code Here

TOP

Related Classes of org.asmatron.messengine.engines.DefaultEventDelegate$ListenerRunner

Copyright © 2018 www.massapicom. 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.