hudson.plugins.im.bot
Class SetAliasCommand.AliasCommand

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

public static class SetAliasCommand.AliasCommand
extends BotCommand

An alias.


Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
SetAliasCommand.AliasCommand(BotCommand cmd, java.lang.String commandName, java.lang.String[] arguments)
           
 
Method Summary
 void executeCommand(Bot bot, IMChat chat, 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

SetAliasCommand.AliasCommand

public SetAliasCommand.AliasCommand(BotCommand cmd,
                                    java.lang.String commandName,
                                    java.lang.String[] arguments)
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 chat,
                           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.
chat - 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.