|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMiniRoomInfo
A data structure used to transmit a small amount of information about a chat room. Contains fields for an exchange number, a service redirect cookie, and an instance number.
Constructor Summary | |
|
MiniRoomInfo(FullRoomInfo roomInfo)
Creates a new miniature room information block with the exchange, cookie, and instance properties of the given full room information block. |
|
MiniRoomInfo(int exchange,
java.lang.String cookie,
int instance)
Creates a new mini room info object with the given properties. |
protected |
MiniRoomInfo(int exchange,
java.lang.String cookie,
int instance,
int totalSize)
Creates a room info object with the given properties. |
Method Summary | |
java.lang.String |
getCookie()
Returns the service redirect cookie that can be used to join this room. |
int |
getExchange()
Returns the number of the exchange on which this room resides. |
int |
getInstance()
Returns "instance number" of this room. |
int |
getTotalSize()
Returns the total size of this object, as read from a block of binary data. |
static MiniRoomInfo |
readMiniRoomInfo(ByteBlock block)
Reads a MiniRoomInfo block from the given data block, or
null if no valid block can be read. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected MiniRoomInfo(int exchange, java.lang.String cookie, int instance, int totalSize)
exchange
- the number of the exchange on which this room residescookie
- the service redirect cookie that can be used to join this
roominstance
- the "instance number" of this roomtotalSize
- the total size of this object, as read from a block of
binary datapublic MiniRoomInfo(FullRoomInfo roomInfo)
roomInfo
- a full room information block from which to derive this
miniature room information block's propertiespublic MiniRoomInfo(int exchange, java.lang.String cookie, int instance)
exchange
- the number of the chat exchange on which the associated
room existscookie
- the service redirect cookie that can be used to join this
roominstance
- the "instance number" of this roomMethod Detail |
public static MiniRoomInfo readMiniRoomInfo(ByteBlock block)
MiniRoomInfo
block from the given data block, or
null
if no valid block can be read.
block
- the data block from which to generate the mini room info
object
null
if no valid object can be readpublic final int getExchange()
ExchangeInfo
for a brief explanation of exchanges.
public final java.lang.String getCookie()
public final int getInstance()
public final int getTotalSize()
-1
if this object was not read using
readMiniRoomInfo
.
-1
if
it was not read from binary data but instead instantiated
manuallypublic void write(java.io.OutputStream out) throws java.io.IOException
LiveWritable
write
in interface LiveWritable
out
- the stream to which to write
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 |