Package org.zeromq

Interface ZStar.Star

  • All Known Implementing Classes:
    ZActor.Double
    Enclosing class:
    ZStar

    public static interface ZStar.Star
    Contract interface when acting in plain sight.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean act​(int events)
      Where acting takes place ...
      Hint: Can be used to process the events or input acquired from the previous step, or ...
      Key point: in the middle of a loop.
      Decision: to act on the next loop or not
      int breathe()
      Called when the star in on stage, just before acting.
      Hint: Can be used to poll events or get input/events from other sources, or ...
      Key point: a loop just started.
      boolean entract()
      Called as an interval between each act.
      Hint: Can be used to perform decisions to continue next loop or not, or to send computed data to outputs, or ...
      Key point: at the end of a loop.
      Decision: to act on the next loop or not
      void prepare()
      Called when the star is in the wings.
      Hint: Can be used to initialize the service, or ...
      Key point: no loop has started already.
      boolean renews()
      Does the star want to renew for a new performance ? Hint: Can be used to perform decisions to continue looping or not, or to send computed data to outputs, or ...
      Key point: the inner looping mechanism just ended
      Decision: to exit or not
    • Method Detail

      • prepare

        void prepare()
        Called when the star is in the wings.
        Hint: Can be used to initialize the service, or ...
        Key point: no loop has started already.
      • breathe

        int breathe()
        Called when the star in on stage, just before acting.
        Hint: Can be used to poll events or get input/events from other sources, or ...
        Key point: a loop just started.
        Returns:
        the number of events to process
      • act

        boolean act​(int events)
        Where acting takes place ...
        Hint: Can be used to process the events or input acquired from the previous step, or ...
        Key point: in the middle of a loop.
        Decision: to act on the next loop or not
        Parameters:
        events - the number of events to process
        Returns:
        true to continue till the end of the act, false to stop loopS here.
      • entract

        boolean entract()
        Called as an interval between each act.
        Hint: Can be used to perform decisions to continue next loop or not, or to send computed data to outputs, or ...
        Key point: at the end of a loop.
        Decision: to act on the next loop or not
        Returns:
        true to continue acting, false to stop loopS here.
      • renews

        boolean renews()
        Does the star want to renew for a new performance ? Hint: Can be used to perform decisions to continue looping or not, or to send computed data to outputs, or ...
        Key point: the inner looping mechanism just ended
        Decision: to exit or not
        Returns:
        true to restart acting, false to leave here