hudson.plugins.im.bot
Class AbortCommand

java.lang.Object
  extended by hudson.plugins.im.bot.AbstractTextSendingCommand
      extended by hudson.plugins.im.bot.AbortCommand
All Implemented Interfaces:
BotCommand

public class AbortCommand
extends AbstractTextSendingCommand

Abort a running job

Author:
R. Tyler Ballance

Constructor Summary
AbortCommand()
           
 
Method Summary
 java.lang.String getHelp()
          Return the command usage text.
protected  java.lang.CharSequence getMessageForJob(hudson.model.AbstractProject<?,?> project, Sender sender, java.lang.String[] args)
          Returns the message to return for this job.
protected  java.lang.String getReply(Sender sender, java.lang.String[] args)
          Gets the text reply
 
Methods inherited from class hudson.plugins.im.bot.AbstractTextSendingCommand
executeCommand, getErrorReply, getJobProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbortCommand

public AbortCommand()
Method Detail

getHelp

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

Returns:
the command usage text

getMessageForJob

protected java.lang.CharSequence getMessageForJob(hudson.model.AbstractProject<?,?> project,
                                                  Sender sender,
                                                  java.lang.String[] args)
                                           throws CommandException
Returns the message to return for this job. Implementors should only return a String if the command was executed successfully. Otherwise a CommandException should be thrown!

Parameters:
project - The job
sender - The sender of the command
Returns:
the result message for this job if the command was executed successfully
Throws:
CommandException - if the command couldn't be executed for any reason

getReply

protected java.lang.String getReply(Sender sender,
                                    java.lang.String[] args)
Description copied from class: AbstractTextSendingCommand
Gets the text reply

Specified by:
getReply in class AbstractTextSendingCommand
Parameters:
sender - the command sender
args - arguments passed to the command, where args[0] is the command name itself


Copyright © 2010. All Rights Reserved.