|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--mstar.Commands
Commands is an abstract base class for creating a high-level representation of commands for MUD's, MOO's, MUSHes, and other collaborative environments. Each command that is generated from this class is only responsible for sending the command to the collaborative environment.
| Constructor Summary | |
Commands()
Constructs a command class with no input or output streams defined. |
|
Commands(java.io.DataInputStream in,
java.io.PrintStream out)
Constructs a command class and defines the input and output streams for the collaborative environment. |
|
| Method Summary | |
abstract void |
describe(java.lang.String description)
Sends the describe command to the collaborative environment. |
abstract void |
emote(java.lang.String who,
java.lang.String what)
Sends an emote command to the collaborative environment. |
abstract java.lang.String |
getHowPages()
Deprecated. |
abstract java.lang.String |
getHowSays()
Deprecated. |
abstract java.lang.String |
getHowWhispers()
Deprecated. |
java.io.DataInputStream |
getInputStream()
Gets the input stream to listen to the collaborative environment on. |
java.io.PrintStream |
getOutputStream()
Gets the output stream to write to the collaborative environment on. |
abstract void |
go(java.lang.String where)
Send the go command to the collaborative environment. |
abstract void |
goHome()
A special case of the go command to send a player back to his or her default room in the collaborative environment. |
abstract void |
inventory()
Sends the inventory command to the collaborative environment. |
abstract void |
look(java.lang.String at)
Send the look command to the collaborative environment. |
abstract void |
mutter(java.lang.String who,
java.lang.String what)
Sends a muttered message to everyone except the character in the collaborative environment. |
abstract void |
page(java.lang.String who,
java.lang.String what)
Sends a page to a specific character in the collaborative environment. |
abstract void |
pose(java.lang.String what)
Send the pose command to the collaborative environment. |
abstract void |
quit()
Sends the command to the collaborative environment to end the current session. |
abstract void |
say(java.lang.String what)
Send the say command to the collaborative environment. |
abstract void |
set(java.lang.String what,
java.lang.String flag)
Sends the set command to the collaborative environment. |
void |
setInputStream(java.io.DataInputStream in)
Sets the input stream to listen to the collaborative environment on. |
abstract void |
setOutputPrefix(java.lang.String what)
Sends the OUTPUTPREFIX command to the collaborative environment. |
void |
setOutputStream(java.io.PrintStream out)
Sets the output stream to write to the collaborative environment on. |
abstract void |
setOutputSuffix(java.lang.String what)
Sends the OUTPUTSUFFIX command to the collaborative environment. |
abstract void |
whisper(java.lang.String who,
java.lang.String what)
Sends a whispered message to a specific character in the collaborative environment. |
abstract void |
yell(java.lang.String what)
Send the yell command to the collaborative environment. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Commands()
public Commands(java.io.DataInputStream in,
java.io.PrintStream out)
in - the stream to listen to the collaborative environment on.out - the stream to write to the collaborative environment on.| Method Detail |
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 abstract void look(java.lang.String at)
at - the object in the collaborative environment to look at.
This parameter may be null.public abstract void say(java.lang.String what)
what - to say.public abstract void yell(java.lang.String what)
what - to yell.public abstract void pose(java.lang.String what)
what - fake action to perform.
public abstract void page(java.lang.String who,
java.lang.String what)
who - to send the page to.what - the message is. What may be null and the behaviour
of the page may vary from collaborative environment to
collaborative environment.
public abstract void whisper(java.lang.String who,
java.lang.String what)
who - to send the whisper to.what - the message is.
public abstract void mutter(java.lang.String who,
java.lang.String what)
who - not to send the message to.what - the message is.
public abstract void emote(java.lang.String who,
java.lang.String what)
who - to send the emote to.what - the emoted action is.public abstract void go(java.lang.String where)
where - the direction to go.public abstract void goHome()
public abstract void quit()
public abstract void set(java.lang.String what,
java.lang.String flag)
what - to set.flag - the value to set on the object.public abstract void inventory()
public abstract void setOutputPrefix(java.lang.String what)
what - the string to prefix the output of a command with.public abstract void setOutputSuffix(java.lang.String what)
what - the string to suffix the output of a command with.public abstract void describe(java.lang.String description)
public abstract java.lang.String getHowSays()
public abstract java.lang.String getHowPages()
public abstract java.lang.String getHowWhispers()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||