Class MailboxWatch<Msg extends Serializable>

java.lang.Object
java.lang.Thread
ucb.util.mailbox.MailboxWatch<Msg>
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 Details

    • 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 Details

    • run

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

      public void close()