java.lang.Object
alice.tucson.User
alice.tucson.Agent
demo.tucson.chat.ChatAgent
- All Implemented Interfaces:
- java.lang.Runnable, alice.tucson.TucsonInterface
- public class ChatAgent
- extends alice.tucson.Agent
the Chat agent acts as interface between
the user and the room, in particular sending
messages to room and collecting updates from
the room
|
Method Summary |
void |
notifyLeave()
method called by the GUI to notifdy the agent
that the user want to leave |
void |
notifyNewMsg(java.lang.String msg)
method called by the Observer Agent to notify the agent
that the user provided a new message |
void |
run()
This method will be called by whoever wishes to run your class
implementing Runnable. |
| Methods inherited from class alice.tucson.User |
getId, getSpec, getSpec, in, in, inp, inp, out, out, outAsync, outAsync, rd, rd, rdp, rdp, setDaemonPort, setSpec, setSpec, shutdown |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chatId
alice.tucson.TupleCentreId chatId
event
ChatAgent.GUIEvent event
name
java.lang.String name
obsAgentId
alice.tucson.AgentId obsAgentId
ChatAgent
public ChatAgent(java.lang.String name,
alice.tucson.AgentId aid,
alice.tucson.AgentId obsAgentId,
alice.tucson.TupleCentreId tid)
run
public void run()
- Description copied from interface:
java.lang.Runnable
- This method will be called by whoever wishes to run your class
implementing Runnable. Note that there are no restrictions on what
you are allowed to do in the run method, except that you cannot
throw a checked exception.
notifyNewMsg
public void notifyNewMsg(java.lang.String msg)
- method called by the Observer Agent to notify the agent
that the user provided a new message
notifyLeave
public void notifyLeave()
- method called by the GUI to notifdy the agent
that the user want to leave