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
-
Chatter()
-
-
action(Event, Object)
- Figure out where the action occurred and to the appropriate
thing.
-
addMessage(OtherChatter, String)
-
-
alias(String)
- Set my alias to be something else.
-
changeAlias(int, String)
- The server invokes this to let us know that a chater has changed
their alias.
-
changeState(int, int)
- The server invokes this to let us know that a chater has changed
their state.
-
chaterGone(int)
- The server invokes this to let us know that a chater has left
the conversation.
-
destroy()
- Cleans up whatever resources are being held.
-
init()
- Initializes the applet.
-
messageFrom(int, int, String)
- The server invokes this to let us know that a message has arrived from
a chater.
-
newChatter(int, String)
-
-
newMessage(String)
- Send a new message from this user.
-
start()
- Called to start the applet.
-
stop()
- Called to stop the applet.
Chatter
public Chatter()
init
public void init()
- Initializes the applet.
- Overrides:
- init in class Applet
start
public void start()
- Called to start the applet.
- Overrides:
- start in class Applet
stop
public void stop()
- Called to stop the applet.
- Overrides:
- stop in class Applet
destroy
public void destroy()
- Cleans up whatever resources are being held.
- Overrides:
- destroy in class Applet
addMessage
public synchronized void addMessage(OtherChatter other,
String message)
action
public boolean action(Event ev,
Object obj)
- Figure out where the action occurred and to the appropriate
thing.
- Overrides:
- action in class Component
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.
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.
newChatter
public void newChatter(int id,
String alias)
chaterGone
public void chaterGone(int whose)
- The server invokes this to let us know that a chater has left
the conversation.
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.
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.
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