cz.cuni.amis.pogamut.defcon.communication.messages.commands
Class SendChatMessage

Package class diagram package SendChatMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand
          extended by cz.cuni.amis.pogamut.defcon.communication.messages.commands.SendChatMessage

public class SendChatMessage
extends DefConCommand

Sends the message down to the specified chat channel inside the DefCon.


Constructor Summary
SendChatMessage(SendChatMessage original)
          Cloning constructor...
SendChatMessage(String message, ChatChannel channel)
          Creates new instance of command SendChatMessage.
 
Method Summary
 ChatChannel getChannel()
          Chat channel to use.
 String getMessage()
          Message to send.
 void perform()
          Performs the command - to be used only by the DefConCommandExecutor.
 SendChatMessage setChannel(ChatChannel channel)
          Chat channel to use.
 SendChatMessage setMessage(String message)
          Message to send.
 String toHtmlString()
          Returns message in html format.
 String toString()
          Returns human readable serialization of the message.
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand
getStringizedFields, toMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SendChatMessage

public SendChatMessage(String message,
                       ChatChannel channel)
Creates new instance of command SendChatMessage. Sends the message down to the specified chat channel inside the DefCon.

Parameters:
message - Message to send.
channel - Chat channel to use.

SendChatMessage

public SendChatMessage(SendChatMessage original)
Cloning constructor...

Parameters:
original -
Method Detail

getMessage

public String getMessage()
Message to send.

Returns:
String

setMessage

public SendChatMessage setMessage(String message)
Message to send.

Parameters:
message -
Returns:
this object, allows you to chain setters

getChannel

public ChatChannel getChannel()
Chat channel to use.

Returns:
ChatChannel

setChannel

public SendChatMessage setChannel(ChatChannel channel)
Chat channel to use.

Parameters:
channel -
Returns:
this object, allows you to chain setters

perform

public void perform()
Performs the command - to be used only by the DefConCommandExecutor.

Specified by:
perform in class DefConCommand

toString

public String toString()
Returns human readable serialization of the message.

Overrides:
toString in class CommandMessage
Returns:
human readable string

toHtmlString

public String toHtmlString()
Returns message in html format.

Returns:
html message


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.