f00f.net.irc.martyr.commands
Class RawCommand
java.lang.Object
|
+--f00f.net.irc.martyr.commands.RawCommand
- All Implemented Interfaces:
- Command
- public class RawCommand
- extends java.lang.Object
- implements Command
|
Constructor Summary |
RawCommand(java.lang.String raw)
|
|
Method Summary |
java.lang.String |
getSourceString()
Returns the string given in the constructor. |
State |
getState()
Some commands, when received by the server, can only occur in one
state. |
Command |
parse(java.lang.String prefix,
java.lang.String identifier,
java.lang.String params)
Parses a string and produces a formed command object, if it can. |
java.lang.String |
render()
Simply returns the string given in the constructor. |
void |
selfRegister(CommandRegister commandRegister)
Does nothing. |
void |
setSourceString(java.lang.String str)
Does nothing. |
boolean |
updateClientState(ClientState state)
Asks the command to ensure that information it knows about the
state the server thinks the client is in matches what we have. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RawCommand
public RawCommand(java.lang.String raw)
getState
public State getState()
- Description copied from interface:
Command
- Some commands, when received by the server, can only occur in one
state. Thus, when this command is received, the protocol should
assume that it is in that state, and a state change may be
triggered. A command can use the 'unknown' state to indicate it
can be received in any state (for example, ping).
- Specified by:
getState in interface Command
selfRegister
public void selfRegister(CommandRegister commandRegister)
- Does nothing.
- Specified by:
selfRegister in interface Command
render
public java.lang.String render()
- Simply returns the string given in the constructor.
- Specified by:
render in interface Command
parse
public Command parse(java.lang.String prefix,
java.lang.String identifier,
java.lang.String params)
- Description copied from interface:
Command
- Parses a string and produces a formed command object, if it can.
Should return null if it cannot form the command object. The
identifier is usually ignored, except in the special case where
commands can be identified by multiple identifiers. In that case,
the behaviour of the command may change in sublte ways.
- Specified by:
parse in interface Command
- Returns:
- null
updateClientState
public boolean updateClientState(ClientState state)
- Description copied from interface:
Command
- Asks the command to ensure that information it knows about the
state the server thinks the client is in matches what we have.
Returns true if state changes were made.
- Specified by:
updateClientState in interface Command
- Returns:
- false as it does not do anything.
setSourceString
public void setSourceString(java.lang.String str)
- Does nothing.
- Specified by:
setSourceString in interface Command
getSourceString
public java.lang.String getSourceString()
- Returns the string given in the constructor.
- Specified by:
getSourceString in interface Command
Copyright ? 2000,2001, f00f networks. All Rights Reserved.