|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.im.bot.BotCommand
public abstract class BotCommand
Command pattern contract for IM bot commands.
To register custom bot commands, define a subtype and then put @Extension on your class.
Bot| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Constructor Summary | |
|---|---|
BotCommand()
|
|
| Method Summary | |
|---|---|
static hudson.ExtensionList<BotCommand> |
all()
Returns all the registered BotCommands. |
abstract void |
executeCommand(Bot bot,
IMChat chat,
IMMessage message,
Sender sender,
java.lang.String[] args)
Execute a command. |
abstract java.util.Collection<java.lang.String> |
getCommandNames()
Obtains the name of the command. |
abstract java.lang.String |
getHelp()
Return the command usage text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BotCommand()
| Method Detail |
|---|
public abstract java.util.Collection<java.lang.String> getCommandNames()
public abstract void executeCommand(Bot bot,
IMChat chat,
IMMessage message,
Sender sender,
java.lang.String[] args)
throws IMException
bot - The bot for which this command runs. Never null.chat - the IMChat object, may be used to send reply messagesmessage - the original IMMessagesender - the command senderargs - arguments passed to the command, where args[0] is the command name itself
IMException - if anything goes wrong while communicating with the remote IM serverpublic abstract java.lang.String getHelp()
public static hudson.ExtensionList<BotCommand> all()
BotCommands.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||