Package sudoku

Class Timer


  • public class Timer
    extends akka.actor.typed.javadsl.AbstractBehavior<Timer.Protocol>
    Simple reactive agent that replies after some time.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Timer.CreateMsg
      Message creating the agent, as well as starting the countdown.
      static interface  Timer.Protocol
      Protocol interface for input messages.
      • Nested classes/interfaces inherited from class akka.actor.typed.Behavior

        akka.actor.typed.Behavior.BehaviorDecorators<Inner extends Object>, akka.actor.typed.Behavior.BehaviorDecorators$
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Timer​(akka.actor.typed.javadsl.ActorContext<Timer.Protocol> context, Timer.CreateMsg msg)
      Private constructor called only by CreateMsg.
    • Constructor Detail

      • Timer

        private Timer​(akka.actor.typed.javadsl.ActorContext<Timer.Protocol> context,
                      Timer.CreateMsg msg)
        Private constructor called only by CreateMsg.
    • Method Detail

      • create

        public static akka.actor.typed.Behavior<Timer.Protocol> create​(Timer.CreateMsg msg)
        Public method that calls private constructor. Existence required by Akka.
        Returns:
        wrapped Behavior
      • createReceive

        public akka.actor.typed.javadsl.Receive<Timer.Protocol> createReceive()
        Main method controlling incoming messages. Existence required by Akka.
        Specified by:
        createReceive in class akka.actor.typed.javadsl.AbstractBehavior<Timer.Protocol>
        Returns:
        wrapped Behavior
      • countdown

        private void countdown​(int milliseconds)
        Timer waits for some time.