Class prominence.chat.Chat
All Packages Class Hierarchy This Package Previous Next Index
Class prominence.chat.Chat
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----prominence.chat.Chat
- public class Chat
- extends Frame
An Internet chat class using extended generic message classes.
The Chat class is a standalone Frame that contains a
Whiteboard whiteboard and a Chatboard text-based chat.
The chat system supports a Registry naming registry, with the current users
displayed in a list. Messages are sent to just those clients that are currently
selected in the list, or are broadcast if no clients are selected.
- See Also:
- Chatboard, Whiteboard, Registry, ChatSystemClient
-
c
- The communications layer.
-
Chat(String, ChatSystemClient)
- Creates a new Chat with the specified client name,
communicating through the specified ChatSystemClient
communications layer.
-
handleEvent(Event)
- Handles user interaction.
-
main(String[])
- Starts a new Chat, connecting to a specified server with a chosen name.
c
protected ChatSystemClient c
- The communications layer.
Chat
public Chat(String name,
ChatSystemClient c)
- Creates a new Chat with the specified client name,
communicating through the specified ChatSystemClient
communications layer.
Creates and lays out a Whiteboard, Chatboard and Registry.
- Parameters:
- name - The client name
- c - The communications layer to use
handleEvent
public boolean handleEvent(Event e)
- Handles user interaction.
- Parameters:
- e - The Event
- Overrides:
- handleEvent in class Component
main
public static void main(String args[]) throws IOException
- Starts a new Chat, connecting to a specified server with a chosen name.
Syntax:
java prominence.chat.Chat <host> <port> <name>
- Throws: IOException
- Occurs when the remote host could not be contacted or the
client name was already in use.
All Packages Class Hierarchy This Package Previous Next Index