|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--mstar.Responder
A class that emits responses from the robot to other players in the collaborative environment.
| Constructor Summary | |
Responder()
Creates an empty responder. |
|
Responder(java.lang.String name)
Creates a responder and sets the name of the robot to the specified name. |
|
Responder(java.lang.String name,
MudMap map)
Creates a responder and sets the name of the robot to the specified name, and the map to the specified MudMap. |
|
Responder(java.lang.String name,
MudMap map,
java.lang.String who)
Creates a responder and sets the name of the robot to the specified name, the map to the specified MudMap, and who to the name of the character that the robot is responding to. |
|
Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what)
Creates a responder and sets the name of the robot to the specified name, the map to the specified MudMap, who to the name of the character that the robot is responding to, and what the character said to the robot. |
|
Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what,
java.io.DataInputStream in)
Creates a responder and sets the name of the robot to the specified name, the map to the specified MudMap, who to the name of the character that the robot is responding to, what the character said to the robot, and the input stream that the robot can listen to the collaborative environment on. |
|
Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what,
java.io.DataInputStream in,
java.io.PrintStream out)
Creates a responder and sets the name of the robot to the specified name, the map to the specified MudMap, who to the name of the character that the robot is responding to, what the character said to the robot, the input stream that the robot can listen to the collaborative environment on, and the output stream that the robot can write to the collaborative environment on. |
|
Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what,
java.io.DataInputStream in,
java.io.PrintStream out,
java.util.Properties properties)
Creates a responder and sets the name of the robot to the specified name, the map to the specified MudMap, who to the name of the character that the robot is responding to, what the character said to the robot, the input stream that the robot can listen to the collaborative environment on, the output stream that the robot can write to the collaborative environment on, and the properties that were set for the robot when it started. |
|
| Method Summary | |
void |
addAction(java.lang.String how,
java.lang.String action)
Adds an action, pose, emote, etc. |
void |
addResponse(java.lang.String response)
Adds a spoken response. |
protected void |
addRobotAction(java.lang.String action,
java.lang.String response)
Adds an action, pose, emote, etc. |
abstract boolean |
canProcess(Chatter c)
Determines if this responder will respond to the data contained in the chatter. |
java.lang.String |
getAction()
Gets the robot's action. |
RobotAction[] |
getActions()
Gets the list of actions that the robot is supposed to perform. |
Commands |
getCommands()
Gets the commands for this collaborative environment. |
Connection |
getConnection()
Gets the connection for this collaborative environment. |
java.lang.String |
getHow()
Gets how the person interacted with the robot. |
java.io.DataInputStream |
getInputStream()
Gets the input stream to listen to the collaborative environment on. |
MudMap |
getMap()
Gets the map of the mud. |
java.io.PrintStream |
getOutputStream()
Gets the output stream to write to the collaborative environment on. |
java.lang.String |
getOwner()
Gets the name of the owner of this robot. |
PlayerMap |
getPlayerMap()
Gets the current players map to the specified map. |
ProcessTable |
getProcessTable()
Deprecated. |
java.util.Properties |
getProperties()
Gets the properties from when the robot was started. |
java.lang.String |
getResponse()
Gets the robot's response. |
java.lang.String |
getRobotName()
Gets the name of the robot. |
ParseRoomDescription |
getRoomParser()
Sets the room parser. |
java.util.Vector |
getShared()
Gets the shared data space. |
int |
getState()
Gets the state of the responder. |
java.lang.String |
getWhat()
Gets what the person said to the robot. |
java.lang.String |
getWho()
Gets who is talking to the robot. |
abstract void |
process()
Actually process the input from the collaborative environment and add the actions and responses to the Vector to be output when this routine returns. |
abstract java.lang.String |
serviceType()
Returns a string the defines the type of service that this responder provides. |
void |
setAction(java.lang.String action)
Sets the robot's action. |
void |
setCommands(Commands commands)
Sets the commands for this collaborative environment. |
void |
setConnection(Connection connection)
Sets the connection for this collaborative environment. |
void |
setHow(java.lang.String how)
Sets how the person interacted with the robot. |
void |
setInputStream(java.io.DataInputStream in)
Sets the input stream to listen to the collaborative environment on. |
void |
setMap(MudMap map)
Sets the map of the mud. |
void |
setOutputStream(java.io.PrintStream out)
Sets the output stream to write to the collaborative environment on. |
void |
setOwner(java.lang.String owner)
Sets the name of the owner of this robot. |
void |
setPlayerMap(PlayerMap players)
Sets the current players map to the specified map. |
void |
setProcessTable(ProcessTable processTable)
Deprecated. |
void |
setProperties(java.util.Properties properties)
Sets the properties from when the robot was started. |
protected void |
setResponse(java.lang.String response)
Sets the robot's response. |
void |
setRobotName(java.lang.String name)
Sets the name of the robot. |
void |
setRoomParser(ParseRoomDescription roomParser)
Sets the room parser. |
void |
setShared(java.util.Vector shared)
Sets the shared data space. |
void |
setState(int state)
Sets the state of the responder. |
void |
setWhat(java.lang.String what)
Sets what the person said to the robot. |
void |
setWho(java.lang.String who)
Sets who is talking to the robot. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Responder()
public Responder(java.lang.String name)
name - The name of the robot.
public Responder(java.lang.String name,
MudMap map)
name - The name of the robot.map - The map of the mud that the robot has constructed.
public Responder(java.lang.String name,
MudMap map,
java.lang.String who)
name - The name of the robot.map - The map of the mud that the robot has constructed.who - The name of the character that the robot is
responding to.
public Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what)
name - The name of the robot.map - The map of the mud that the robot has constructed.who - The name of the character that the robot is
responding to.what - What the character said to the robot.
public Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what,
java.io.DataInputStream in)
name - The name of the robot.map - The map of the mud that the robot has constructed.who - The name of the character that the robot is
responding to.what - What the character said to the robot.in - The input stream that the robot can listen to the
environment on.
public Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what,
java.io.DataInputStream in,
java.io.PrintStream out)
name - The name of the robot.map - The map of the mud that the robot has constructed.who - The name of the character that the robot is
responding to.what - What the character said to the robot.in - The input stream that the robot can listen to the
environment on.out - The output stream that the robot can output to.
public Responder(java.lang.String name,
MudMap map,
java.lang.String who,
java.lang.String what,
java.io.DataInputStream in,
java.io.PrintStream out,
java.util.Properties properties)
name - The name of the robot.map - The map of the mud that the robot has constructed.who - The name of the character that the robot is
responding to.what - What the character said to the robot.in - The input stream that the robot can listen to the
environment on.out - The output stream that the robot can output to.properties - The properties that the robot was started with.| Method Detail |
public void setRobotName(java.lang.String name)
name - The name of the robot.public java.lang.String getRobotName()
public void setMap(MudMap map)
map - The map of the mud that the robot has constructed.public MudMap getMap()
public void setWho(java.lang.String who)
who - The name of the character that the robot is responding
to.public java.lang.String getWho()
public void setWhat(java.lang.String what)
what - What the character said to the robot.public java.lang.String getWhat()
public void setHow(java.lang.String how)
how - they interacted with the robot.public java.lang.String getHow()
protected void setResponse(java.lang.String response)
response - the response from the robot.public java.lang.String getResponse()
public void setAction(java.lang.String action)
action - the robot's action.public java.lang.String getAction()
public void setProperties(java.util.Properties properties)
properties - the robot's properties from when it was started.public java.util.Properties getProperties()
public void setInputStream(java.io.DataInputStream in)
in - the stream to listen to the collaborative environment on.public java.io.DataInputStream getInputStream()
public void setOutputStream(java.io.PrintStream out)
out - the stream to write to the collaborative environment on.public java.io.PrintStream getOutputStream()
public void setPlayerMap(PlayerMap players)
players - the players map.public PlayerMap getPlayerMap()
public void setRoomParser(ParseRoomDescription roomParser)
roomParser - the parser for parsing room descriptions.public ParseRoomDescription getRoomParser()
public void setConnection(Connection connection)
connection - the connection for this collaborative
environment.public Connection getConnection()
public void setCommands(Commands commands)
commands - the commands for this collaborative environment.public Commands getCommands()
public void setOwner(java.lang.String owner)
owner - the name of the owner of this robot.public java.lang.String getOwner()
public void setProcessTable(ProcessTable processTable)
public ProcessTable getProcessTable()
protected void addRobotAction(java.lang.String action,
java.lang.String response)
action - the type of action to perform.response - the action to perform.public void addResponse(java.lang.String response)
response - the response that the robot should say to the
player that it is interacting with.
public void addAction(java.lang.String how,
java.lang.String action)
how - the type of action to perform.action - the action to perform.public RobotAction[] getActions()
public void setState(int state)
state - the state the responder is in.public int getState()
public void setShared(java.util.Vector shared)
shared - the vector of shared information.public java.util.Vector getShared()
public abstract void process()
public abstract java.lang.String serviceType()
public abstract boolean canProcess(Chatter c)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||