Package edu.rit.chat1 provides the Chat Demo Application Version 1, an M2MI-based chat application. The Chat Demo is intended merely to demonstrate M2MI omnihandle invocations and is not intended to be a full-featured chat application.

To run the Chat Demo application, do the following steps on each participating machine:

  1. Configure the M2MI Layer. See package edu.rit.m2mi and class M2MIProperties for further information.
     
  2. Configure the M2MP Layer and run the M2MP Daemon in a separate process. See package edu.rit.m2mp, class M2MPProperties, and class Daemon for further information.
     
  3. Run an instance of the Chat Demo application by typing this command in a separate process:
     
        java edu.rit.chat1.Chat <name>
     
    replacing <name> with the user name. The application displays a chat window.
     

     
  4. Type a line of text into any chat window on any machine and hit return or click the "Send" button. The line of text, prefixed by the user name, shows up in all the chat windows on all the machines.

The Chat program displays a simple chat UI (an instance of class ChatFrame), and the program exports a chat object (an instance of class Chat) that implements interface ChatRef. When the user sends a line of text in the UI, the line is broadcast to all the chat objects by calling putLine() on an omnihandle for interface ChatRef. When each chat object receives a putLine() invocation, it displays the line of text in the chat log in its UI. In this way the line of text appears in all the chat programs that are running out there.