Class MailboxWatch<Msg extends Serializable>

  • All Implemented Interfaces:
    Runnable

    public class MailboxWatch<Msg extends Serializable>
    extends Thread
    A MailboxWatch takes a stream of forwarded messages from a Mailbox and prints them to a specified stream. It is a thread and can be stopped by being interrupted.
    • Constructor Detail

      • MailboxWatch

        public MailboxWatch​(Class<Msg> msgClass,
                            Mailbox<Msg> box,
                            String id,
                            PrintStream str)
        A new MailboxWatch on BOX, reporting to STR. ID is a string used to label each reported message.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • close

        public void close()