net.kano.joscar.snaccmd.chat
Class SendChatMsgIcbm
java.lang.Object
SnacCommand
AbstractIcbm
AbstractChatMsgIcbm
SendChatMsgIcbm
- public class SendChatMsgIcbm
- extends AbstractChatMsgIcbm
A command used to send a message to a chat room.
- Source of this SNAC:
- AIM client
- SNAC command type:
- Family
0x0e
, command 0x05
Constructor Summary |
|
SendChatMsgIcbm(ChatMsg chatMsg)
Creates a new outgoing chat message ICBM with default properties. |
|
SendChatMsgIcbm(long messageId,
boolean toBeReflected,
ChatMsg chatMsg)
Creates a new outgoing chat message ICBM with the given properties. |
protected |
SendChatMsgIcbm(SnacPacket packet)
Generates a new chat message send ICBM from the given incoming SNAC
packet. |
Method Summary |
boolean |
isToBeReflected()
Returns whether or not this message is marked to be "reflected" back to
the client as normal chat text. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SendChatMsgIcbm
protected SendChatMsgIcbm(SnacPacket packet)
- Generates a new chat message send ICBM from the given incoming SNAC
packet.
- Parameters:
packet
- an incoming send-chat-message SNAC packet
SendChatMsgIcbm
public SendChatMsgIcbm(ChatMsg chatMsg)
- Creates a new outgoing chat message ICBM with default properties. The
ICBM is created with an ICBM message ID of
0
, marked as an
outgoing chat message that should be reflected back to the client as chat
text and that is not an auto-response.
Calling this method is equivalent to calling
#SendChatMsgIcbm(long, boolean, ChatMsg) new SendChatMsgIcbm(0, true,
chatMsg)}.
- Parameters:
chatMsg
- the chat message to send to the chat room
SendChatMsgIcbm
public SendChatMsgIcbm(long messageId,
boolean toBeReflected,
ChatMsg chatMsg)
- Creates a new outgoing chat message ICBM with the given properties.
- Parameters:
messageId
- a message ID for this messagetoBeReflected
- whether this message should be "reflected" back as
normal chat textchatMsg
- the chat message to send
isToBeReflected
public final boolean isToBeReflected()
- Returns whether or not this message is marked to be "reflected" back to
the client as normal chat text. If this is
false
the message
should only be sent to other members of the chat room.
- Returns:
- whether this message should be "reflected" back to the sender as
normal chat text
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