net.kano.joscar.snaccmd.chat
Class RecvChatMsgIcbm

java.lang.Object
  extended bySnacCommand
      extended byAbstractIcbm
          extended byAbstractChatMsgIcbm
              extended byRecvChatMsgIcbm

public class RecvChatMsgIcbm
extends AbstractChatMsgIcbm

A SNAC command containing a message sent to a chat room by another user.

Source of this SNAC:
AIM server
SNAC command type:
Family 0x0e, command 0x06

Field Summary
 
Fields inherited from class AbstractIcbm
CHANNEL_CHAT, CHANNEL_IM, CHANNEL_RV
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  RecvChatMsgIcbm(long messageId, FullUserInfo senderInfo, ChatMsg chatMsg)
          Creates a new outgoing chat message command with the given properties.
protected RecvChatMsgIcbm(SnacPacket packet)
          Generates a new incoming chat message ICBM from the given incoming SNAC packet.
 
Method Summary
 FullUserInfo getSenderInfo()
          Returns a user info block for the user who sent this message.
 java.lang.String toString()
           
protected  void writeChatTlvs(java.io.OutputStream out)
          Writes the extra command-type-specific TLV's to be sent with this ICBM to the given stream.
 
Methods inherited from class AbstractChatMsgIcbm
getChatTlvs, getMessage, writeChannelData
 
Methods inherited from class AbstractIcbm
getChannel, getChannelData, getIcbmChannel, getIcbmMessageId, writeData
 
Methods inherited from class SnacCommand
getCommand, getFamily, getFlag1, getFlag2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecvChatMsgIcbm

protected RecvChatMsgIcbm(SnacPacket packet)
Generates a new incoming chat message ICBM from the given incoming SNAC packet.

Parameters:
packet - an incoming chat message ICBM SNAC packet

RecvChatMsgIcbm

public RecvChatMsgIcbm(long messageId,
                       FullUserInfo senderInfo,
                       ChatMsg chatMsg)
Creates a new outgoing chat message command with the given properties.

Parameters:
messageId - a message ID for this message
senderInfo - a user info block for the user who sent this message, or null for none
chatMsg - the chat message sent
Method Detail

getSenderInfo

public final FullUserInfo getSenderInfo()
Returns a user info block for the user who sent this message.

Returns:
a user info block for the sender of this message

writeChatTlvs

protected void writeChatTlvs(java.io.OutputStream out)
                      throws java.io.IOException
Description copied from class: AbstractChatMsgIcbm
Writes the extra command-type-specific TLV's to be sent with this ICBM to the given stream.

Specified by:
writeChatTlvs in class AbstractChatMsgIcbm
Parameters:
out - the stream to which to write
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()
Overrides:
toString in class AbstractIcbm