hudson.plugins.im.bot
Class Bot.HelpCommand

java.lang.Object
  extended by hudson.plugins.im.bot.BotCommand
      extended by hudson.plugins.im.bot.Bot.HelpCommand
All Implemented Interfaces:
hudson.ExtensionPoint
Enclosing class:
Bot

@Extension
public static class Bot.HelpCommand
extends BotCommand


Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
Bot.HelpCommand()
           
 
Method Summary
 void executeCommand(Bot bot, IMChat groupChat, IMMessage message, Sender sender, java.lang.String[] args)
          Execute a command.
 java.util.Collection<java.lang.String> getCommandNames()
          Obtains the name of the command.
 java.lang.String getHelp()
          Return the command usage text.
 
Methods inherited from class hudson.plugins.im.bot.BotCommand
all
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bot.HelpCommand

public Bot.HelpCommand()
Method Detail

getCommandNames

public java.util.Collection<java.lang.String> getCommandNames()
Description copied from class: BotCommand
Obtains the name of the command. Single commands can register multiple aliases, so this method returns a collection.

Specified by:
getCommandNames in class BotCommand
Returns:
Can be empty but never null.

executeCommand

public void executeCommand(Bot bot,
                           IMChat groupChat,
                           IMMessage message,
                           Sender sender,
                           java.lang.String[] args)
                    throws IMException
Description copied from class: BotCommand
Execute a command.

Specified by:
executeCommand in class BotCommand
Parameters:
bot - The bot for which this command runs. Never null.
groupChat - the IMChat object, may be used to send reply messages
message - the original IMMessage
sender - the command sender
args - arguments passed to the command, where args[0] is the command name itself
Throws:
IMException - if anything goes wrong while communicating with the remote IM server

getHelp

public java.lang.String getHelp()
Description copied from class: BotCommand
Return the command usage text.

Specified by:
getHelp in class BotCommand
Returns:
the command usage text


Copyright © 2010. All Rights Reserved.