com.lyrisoft.chat.server.remote.command
Interface ICommandProcessorRemote

All Known Implementing Classes:
CommandBase

public interface ICommandProcessorRemote

An object that can process a message that came from the client side.

See Also:
com.lyrisoft.chat.server.remote.command

Method Summary
 int accessRequired()
          Return the minimum access level required to carry out this command.
 java.lang.String getHelp()
          Get a help line about this command
 java.lang.String getUsage(java.lang.String myName)
          Construct a usage line (e.g., "usage: /msg [user] [message]") The reason we pass name here is because this object doesn't have a particular name.
 boolean process(ChatClient client, java.lang.String[] args)
           
 void processDistributed(java.lang.String client, java.lang.String origin, java.lang.String[] args, ChatServer server)
           
 void setAccessRequired(int access)
           
 void setHelp(java.lang.String help)
           
 void setUsage(java.lang.String usage)
           
 

Method Detail

process

public boolean process(ChatClient client,
                       java.lang.String[] args)
Returns:
true if this message should be distributed to other clients

processDistributed

public void processDistributed(java.lang.String client,
                               java.lang.String origin,
                               java.lang.String[] args,
                               ChatServer server)

getUsage

public java.lang.String getUsage(java.lang.String myName)
Construct a usage line (e.g., "usage: /msg [user] [message]") The reason we pass name here is because this object doesn't have a particular name. The name is really determined by the CommandProcessorRemote class. A command could possibly have aliases, or it's name may change. To play it safe then, we will pass the name here in order to derive the usage string. Note: the output of this command might not be completely accurate. The output should reflect what the user has to type, not the actual parameters according to the protocol. (The client program knows how to add implicit paramaters, such as the time argument for ping)
Parameters:
name - the name to use in constructing the usage line
Returns:
the usage line

getHelp

public java.lang.String getHelp()
Get a help line about this command
Returns:
a short blurb about what this command does, or null if this command should not show up in a help message

accessRequired

public int accessRequired()
Return the minimum access level required to carry out this command. Access levels are defined as constants in IAuthenticator.
Returns:
the minimum access level required to carry out this command.
See Also:
IAuthenticator

setHelp

public void setHelp(java.lang.String help)

setAccessRequired

public void setAccessRequired(int access)

setUsage

public void setUsage(java.lang.String usage)


Copyright © 2000-2002 Taso Lyristis