f00f.net.irc.martyr.commands
Class AbstractCommand

java.lang.Object
  extended by f00f.net.irc.martyr.commands.AbstractInCommand
      extended by f00f.net.irc.martyr.commands.AbstractCommand
All Implemented Interfaces:
Command, InCommand, OutCommand
Direct Known Subclasses:
InviteCommand, IsonCommand, JoinCommand, KickCommand, MessageCommand, NickCommand, NoticeCommand, PartCommand, PingCommand, QuitCommand, TopicCommand

public abstract class AbstractCommand
extends AbstractInCommand
implements OutCommand

Defines a generic command. Most commands will simply have to override the getIrcIdentifier method and implement the parse and render methods using convenience methods.


Field Summary
 
Fields inherited from class f00f.net.irc.martyr.commands.AbstractInCommand
attributes
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
 java.lang.String render()
          Forms a string appropriate to send to the server.
abstract  java.lang.String renderParams()
          Renders the parameters of this command.
 
Methods inherited from class f00f.net.irc.martyr.commands.AbstractInCommand
getAttribute, getAttributeKeys, getIntParameter, getParameter, getSourceString, getState, parse, selfRegister, setAttribute, setSourceString, updateClientState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface f00f.net.irc.martyr.Command
getIrcIdentifier
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

render

public java.lang.String render()
Forms a string appropriate to send to the server. All commands can be sent by the client.

Specified by:
render in interface OutCommand
Returns:
Rendered string

renderParams

public abstract java.lang.String renderParams()
Renders the parameters of this command.

Returns:
String of rendered parameters


Copyright © 2000-2007 Ben Damm, Daniel Henninger, et al.