hudson.plugins.jabber.im.transport.bot
Class AbstractTextSendingCommand

java.lang.Object
  extended by hudson.plugins.jabber.im.transport.bot.AbstractTextSendingCommand
All Implemented Interfaces:
BotCommand
Direct Known Subclasses:
AliasCommand, JobOverviewCommand, SnackCommand

public abstract class AbstractTextSendingCommand
extends java.lang.Object
implements BotCommand

Abstract command for sending a reply back to the sender.

Author:
kutzi

Constructor Summary
AbstractTextSendingCommand()
           
 
Method Summary
 void executeCommand(JabberChat chat, org.jivesoftware.smack.packet.Message message, java.lang.String sender, java.lang.String[] args)
          Execute a command.
protected abstract  java.lang.String getReply(java.lang.String sender, java.lang.String[] args)
          Gets the text reply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.plugins.jabber.im.transport.bot.BotCommand
getHelp
 

Constructor Detail

AbstractTextSendingCommand

public AbstractTextSendingCommand()
Method Detail

executeCommand

public final void executeCommand(JabberChat chat,
                                 org.jivesoftware.smack.packet.Message message,
                                 java.lang.String sender,
                                 java.lang.String[] args)
                          throws org.jivesoftware.smack.XMPPException
Execute a command.

Specified by:
executeCommand in interface BotCommand
Parameters:
chat - the JabberChat object, may be used to send reply messages
message - the original Message
sender - the room nickname of the command sender
args - arguments passed to the command, where args[0] is the command name itself
Throws:
org.jivesoftware.smack.XMPPException

getReply

protected abstract java.lang.String getReply(java.lang.String sender,
                                             java.lang.String[] args)
Gets the text reply

Parameters:
sender - the room nickname of the command sender
args - arguments passed to the command, where args[0] is the command name itself


Copyright © 2009. All Rights Reserved.