Class java.rmi.examples.chat.Chatter
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.rmi.examples.chat.Chatter

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----java.rmi.examples.chat.Chatter

public class Chatter
extends Applet
implements ChatClient
A Chatter applet is a ChatClient object that connects to a SugarShack ChatServer object. It shows who is current involved in the Chat, and allows the user to type messages for others to see.
See Also:
ChatClient, ChatServer, ChatConnection

Constructor Index

 o Chatter()

Method Index

 o action(Event, Object)
Figure out where the action occurred and to the appropriate thing.
 o addMessage(OtherChatter, String)
 o alias(String)
Set my alias to be something else.
 o changeAlias(int, String)
The server invokes this to let us know that a chater has changed their alias.
 o changeState(int, int)
The server invokes this to let us know that a chater has changed their state.
 o chaterGone(int)
The server invokes this to let us know that a chater has left the conversation.
 o destroy()
Cleans up whatever resources are being held.
 o init()
Initializes the applet.
 o messageFrom(int, int, String)
The server invokes this to let us know that a message has arrived from a chater.
 o newChatter(int, String)
 o newMessage(String)
Send a new message from this user.
 o start()
Called to start the applet.
 o stop()
Called to stop the applet.

Constructors

 o Chatter
  public Chatter()

Methods

 o init
  public void init()
Initializes the applet.
Overrides:
init in class Applet
 o start
  public void start()
Called to start the applet.
Overrides:
start in class Applet
 o stop
  public void stop()
Called to stop the applet.
Overrides:
stop in class Applet
 o destroy
  public void destroy()
Cleans up whatever resources are being held.
Overrides:
destroy in class Applet
 o addMessage
  public synchronized void addMessage(OtherChatter other,
                                      String message)
 o action
  public boolean action(Event ev,
                        Object obj)
Figure out where the action occurred and to the appropriate thing.
Overrides:
action in class Component
 o alias
  public void alias(String newAlias) throws RemoteException
Set my alias to be something else. This requires contact the server to inform it of the change.
 o newMessage
  public void newMessage(String message) throws RemoteException
Send a new message from this user. This requires telling the server that there is a new message.
 o newChatter
  public void newChatter(int id,
                         String alias)
 o chaterGone
  public void chaterGone(int whose)
The server invokes this to let us know that a chater has left the conversation.
 o changeAlias
  public void changeAlias(int whose,
                          String newAlias) throws UnknownChatterException
The server invokes this to let us know that a chater has changed their alias.
 o changeState
  public void changeState(int whose,
                          int newState) throws UnknownChatterException
The server invokes this to let us know that a chater has changed their state.
 o messageFrom
  public void messageFrom(int whose,
                          int messageID,
                          String message) throws UnknownChatterException
The server invokes this to let us know that a message has arrived from a chater.

All Packages  Class Hierarchy  This Package  Previous  Next  Index