Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

demo.tucson.chat
Class ChatAgent  view ChatAgent download ChatAgent.java

java.lang.Object
  extended byalice.tucson.User
      extended byalice.tucson.Agent
          extended bydemo.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


Nested Class Summary
(package private)  class ChatAgent.GUIEvent
           
 
Field Summary
(package private)  alice.tucson.TupleCentreId chatId
           
(package private)  ChatAgent.GUIEvent event
           
(package private)  java.lang.String name
           
(package private)  alice.tucson.AgentId obsAgentId
           
 
Fields inherited from class alice.tucson.User
defaultTid, user
 
Constructor Summary
ChatAgent(java.lang.String name, alice.tucson.AgentId aid, alice.tucson.AgentId obsAgentId, alice.tucson.TupleCentreId tid)
           
 
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
 

Field Detail

chatId

alice.tucson.TupleCentreId chatId

event

ChatAgent.GUIEvent event

name

java.lang.String name

obsAgentId

alice.tucson.AgentId obsAgentId
Constructor Detail

ChatAgent

public ChatAgent(java.lang.String name,
                 alice.tucson.AgentId aid,
                 alice.tucson.AgentId obsAgentId,
                 alice.tucson.TupleCentreId tid)
Method Detail

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