Package org.zeromq

Class ZActor.ActorFortune

java.lang.Object
org.zeromq.ZActor.ActorFortune
All Implemented Interfaces:
ZStar.Fortune, ZStar.TimeTaker
Enclosing class:
ZActor

private static final class ZActor.ActorFortune extends Object implements ZStar.Fortune
  • Field Details

  • Constructor Details

  • Method Details

    • premiere

      public String premiere(ZMQ.Socket mic, Object... args)
      Description copied from interface: ZStar.Fortune
      This is the grand premiere! Called when the star enters the plateau. The show is about to begin. Inform the public about that. Called before the creation of the first star and its sockets
      Specified by:
      premiere in interface ZStar.Fortune
      Parameters:
      mic - the pipe to the Corbeille side
      args - the arguments passed as parameters of the star constructor
      Returns:
      the name of the upcoming performance.
    • create

      public ZStar.Star create(ZContext ctx, ZMQ.Socket pipe, int count, ZStar.Star previous, Object... args)
      Description copied from interface: ZStar.Fortune
      Creates a star.
      Specified by:
      create in interface ZStar.Fortune
      Parameters:
      ctx - the context used for the creation of the sockets
      pipe - the pipe to the Corbeille side
      count - the number of times a star was created.
      previous - the previous star if any (null at the first creation)
      args - the arguments passed as parameters of the star constructor
      Returns:
      a new star is born!
    • interview

      public boolean interview(ZMQ.Socket mic)
      Description copied from interface: ZStar.Fortune
      The show is over. Called when the show is over.
      Specified by:
      interview in interface ZStar.Fortune
      Parameters:
      mic - the pipe to the Corbeille side
      Returns:
      true to allow to spread the word and close all future communications
    • party

      public void party(ZContext ctx)
      Description copied from interface: ZStar.TimeTaker
      Called when the show is finished but no cleaning is still done. Useful to make the background thread wait a little bit, for example.
      Specified by:
      party in interface ZStar.TimeTaker
      Parameters:
      ctx - the shadow context