net.kano.joscar.snaccmd.rooms
Class JoinRoomCmd
java.lang.Object
SnacCommand
RoomCommand
JoinRoomCmd
- public class JoinRoomCmd
- extends RoomCommand
A SNAC command used to join or create a chat room whose name is already
known. This command should normally be used when joining a room to which one
has not been already invited. The response to this command, normally a RoomResponse
, contains a room information block and a cookie, which can then
be passed to a ServiceRequest
which will
then provide you with a connection to the server on which the requested chat
room resides.
- See Also:
RoomResponse
,
ServiceRequest
- Source of this SNAC:
- AIM client
- SNAC command type:
- Family
0x0d
, command 0x08
Constructor Summary |
|
JoinRoomCmd(FullRoomInfo roomInfo)
Creates a new outgoing join-room request for the room described by the
given room information block. |
protected |
JoinRoomCmd(SnacPacket packet)
Generates a join-room command from the given incoming SNAC packet. |
Method Summary |
FullRoomInfo |
getRoomInfo()
Returns the room information block describing the room attempting to be
joined. |
java.lang.String |
toString()
|
void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JoinRoomCmd
protected JoinRoomCmd(SnacPacket packet)
- Generates a join-room command from the given incoming SNAC packet.
- Parameters:
packet
- the incoming room join request packet
JoinRoomCmd
public JoinRoomCmd(FullRoomInfo roomInfo)
- Creates a new outgoing join-room request for the room described by the
given room information block.
- Parameters:
roomInfo
- a room information block describing the room to be joined
getRoomInfo
public final FullRoomInfo getRoomInfo()
- Returns the room information block describing the room attempting to be
joined.
- Returns:
- the room information block for the room being joined
writeData
public void writeData(java.io.OutputStream out)
throws java.io.IOException
- Description copied from class:
SnacCommand
- Writes this command's SNAC data block to the given stream. The SNAC data
block is the data after the first ten bytes of a SNAC packet.
- Specified by:
writeData
in class SnacCommand
- Parameters:
out
- the stream to which to write the SNAC data
- Throws:
java.io.IOException
- if an I/O error occurs
toString
public java.lang.String toString()