com.lyrisoft.chat.client
Class UserCommands
java.lang.Object
|
+--com.lyrisoft.chat.client.UserCommands
- public class UserCommands
- extends java.lang.Object
Everything that a user types, or clicks comes here for processing.
Based on what was typed, the appropriate UserCommandProcessor is
found and invoked. By default, the SayToRoom UserCommandProcessor
gets invoked.
- See Also:
UserCommandProcessor
Constructor Summary |
UserCommands(java.util.Properties p)
Instantiate a UserCommands object that initializes from the
given Properties object. |
Method Summary |
void |
extendCommandSet(java.lang.String command,
UserCommandProcessor p)
Extend the command set by specifying a new command and a
UserCommandProcessor that will handle it. |
void |
process(java.lang.String input,
java.lang.String arg,
Client client)
Process some user input. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserCommands
public UserCommands(java.util.Properties p)
- Instantiate a UserCommands object that initializes from the
given Properties object.
extendCommandSet
public void extendCommandSet(java.lang.String command,
UserCommandProcessor p)
- Extend the command set by specifying a new command and a
UserCommandProcessor that will handle it.
process
public void process(java.lang.String input,
java.lang.String arg,
Client client)
- Process some user input. Use the first word in the input string
to look up the appropriate UserCommandProcessor (the default UserCommandProcessor,
if none are found, is SayToRoom), and invoke its process() method.
- Parameters:
input
- the text that the user typedarg
- an argument (may be null). Typically the room the message was typed inclient
- the instance of the Client- See Also:
UserCommandProcessor
,
com.lyrisoft.chat.client.command,
SayToRoom
Copyright © 2000-2002 Taso Lyristis