f00f.net.irc.martyr.commands
Class NamesCommand

java.lang.Object
  extended by f00f.net.irc.martyr.commands.NamesCommand
All Implemented Interfaces:
Command, OutCommand

public class NamesCommand
extends java.lang.Object
implements OutCommand

Defines the NAMES command, which is used to get the members of certain channels, or all of them.

Author:
Daniel Henninger

Constructor Summary
NamesCommand()
          No parameter passed to the NAMES command represents a request for all channels.
NamesCommand(java.util.List<java.lang.String> channels)
          Request the membership of multiple channels.
NamesCommand(java.lang.String channel)
          Request the membership of a single channel.
 
Method Summary
 java.lang.String getIrcIdentifier()
          Returns the string IRC uses to identify this command.
 java.lang.String render()
          Forms a string appropriate to send to the server, if required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamesCommand

public NamesCommand()
No parameter passed to the NAMES command represents a request for all channels.


NamesCommand

public NamesCommand(java.lang.String channel)
Request the membership of a single channel.

Parameters:
channel - Channel you want to request membership of.

NamesCommand

public NamesCommand(java.util.List<java.lang.String> channels)
Request the membership of multiple channels.

Parameters:
channels - List of channels you want to retrieve the membership list of.
Method Detail

render

public java.lang.String render()
Description copied from interface: OutCommand
Forms a string appropriate to send to the server, if required. Some commands will have no such string, as they are received and not sent. The string returned is sent to the server verbatim.

Specified by:
render in interface OutCommand
Returns:
Rendered string
See Also:
OutCommand.render()

getIrcIdentifier

public java.lang.String getIrcIdentifier()
Description copied from interface: Command
Returns the string IRC uses to identify this command. Examples: NICK, PING, KILL, 332. Not strictly required for OutCommands as the irc identifier is expected to be part of the reder() result.

Specified by:
getIrcIdentifier in interface Command
Returns:
The IRC identifier string
See Also:
Command.getIrcIdentifier()


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