|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCommand
RoomCommand
RoomResponse
A SNAC command used to respond to every possible request or query made in the
chat room navigation family.
Normally this command only contains either a room
information block or a maximum room value
& a set of exchange information blocks.
This command is normally sent in response to each of JoinRoomCmd
,
ExchangeInfoReq
, RoomRightsRequest
, and RoomInfoReq
.
0x0d
, command 0x09
Field Summary |
Fields inherited from class RoomCommand |
CMD_EXCH_INFO_REQ, CMD_JOIN_ROOM, CMD_MORE_ROOM_INFO, CMD_RIGHTS_REQ, CMD_ROOM_RESPONSE, FAMILY_INFO, FAMILY_ROOM |
Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
Constructor Summary | |
|
RoomResponse(FullRoomInfo roomInfo)
Creates a new outgoing room information response only containing the given room information block. |
|
RoomResponse(int maxRooms,
ExchangeInfo[] exchangeInfos)
Creates a new outgoing room information response containing only the given maximum number of rooms and list of exchange information blocks. |
|
RoomResponse(int maxRooms,
ExchangeInfo[] exchangeInfos,
FullRoomInfo roomInfo)
Creates a new outgoing room information response with the given maximum number of rooms, exchange information blocks, and chat room information block. |
protected |
RoomResponse(SnacPacket packet)
Generates a chat room navigation response command from the given incoming SNAC command. |
Method Summary | |
ExchangeInfo[] |
getExchangeInfos()
Returns the set of chat exchange information blocks that was sent in this response, or null if this field was not sent. |
int |
getMaxRooms()
Returns the maximum number of rooms in which a user can simultaneously reside. |
FullRoomInfo |
getRoomInfo()
Returns the room information block sent in this response, or null if none was sent. |
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 SnacCommand |
getCommand, getFamily, getFlag1, getFlag2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected RoomResponse(SnacPacket packet)
packet
- an incoming chat room navigation family responsepublic RoomResponse(FullRoomInfo roomInfo)
roomInfo
- the room information block to send in this responsepublic RoomResponse(int maxRooms, ExchangeInfo[] exchangeInfos)
maxRooms
- the maximum number of rooms in which a user can
simultaneously resideexchangeInfos
- a list of exchange information blockspublic RoomResponse(int maxRooms, ExchangeInfo[] exchangeInfos, FullRoomInfo roomInfo)
maxRooms
- the maximum number of rooms in which a user can
simultaneously resideexchangeInfos
- a list of exchange information blocksroomInfo
- a room information blockMethod Detail |
public final int getMaxRooms()
-1
if this value was not
sent.
public final ExchangeInfo[] getExchangeInfos()
null
if this field was not sent.
public final FullRoomInfo getRoomInfo()
null
if none was sent.
public void writeData(java.io.OutputStream out) throws java.io.IOException
SnacCommand
writeData
in class SnacCommand
out
- the stream to which to write the SNAC data
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |