Package org.tomighty.bus.messages.timer

Examples of org.tomighty.bus.messages.timer.TimerInterrupted


    @Override
  public void interrupt() {
    if(timer != null) {
      timer.cancel();
      bus.publish(new TimerInterrupted(state.getTime(), state.getPhase()));
    }
  }
View Full Code Here


        TimerTick tick = (TimerTick) messages.get(1);
        assertEquals("Tick's time", Time.seconds(2), tick.getTime());
        assertEquals("Tick's phase", Phase.BREAK, tick.getPhase());

        TimerInterrupted timerInterrupted = (TimerInterrupted) messages.get(2);
        assertEquals("Time when timer was interrupted", Time.seconds(2), timerInterrupted.getTime());
        assertEquals("Phase when timer was interrupted", Phase.BREAK, timerInterrupted.getPhase());
    }
View Full Code Here

TOP

Related Classes of org.tomighty.bus.messages.timer.TimerInterrupted

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.