Data object representing the data for a room. This is immutable, andtherefore safe to cache or store. Note, however, that the data it represents may grow stale.
This class exists solely to support parceling these objects and should not be used directly.
Inherited Constant Summary
|int||ROOM_STATUS_ACTIVE||Constant returned by
|int||ROOM_STATUS_AUTO_MATCHING||Constant returned by
|int||ROOM_STATUS_CONNECTING||Constant returned by
|int||ROOM_STATUS_INVITING||Constant returned by
|int||ROOM_VARIANT_DEFAULT||Constant used to indicate that the variant for a room is unspecified.|
|public static final Creator<RoomEntity>||CREATOR|
Public Method Summary
public int describeContents ()
public boolean equals (Object obj)
public Room freeze ()
Freeze a volatile representation into an immutable representation. Objects returned from this call are safe to cache.
Note that the output of
freeze may not be identical to the parent object, but should
be equal. In other words:
Freezable f1 = new Freezable(); Freezable f2 = f1.freeze(); f1 == f2 may not be true. f1.equals(f2) will be true.
- A concrete implementation of the data object.
public Bundle getAutoMatchCriteria ()
Retrieves the automatch criteria used to create or join this room, if any. May be null if the room has no automatch properties.
- A bundle containing the automatch criteria for this room.
public int getAutoMatchWaitEstimateSeconds ()
Retrieves the estimated wait time for automatching to finish for players who are not automatched immediately, as measured from the time that the room entered the automatching pool.
- The estimated wait time in seconds, or -1 if the room is not automatching or no estimate could be provided.
public long getCreationTimestamp ()
public String getCreatorId ()
public String getDescription ()
public void getDescription (CharArrayBuffer dataOut)
Loads the room description into the given
|dataOut||The buffer to load the data into.|
public Participant getParticipant (String participantId)
Get a participant in a room by its ID. Note that the participant ID must correspond to a participant in this match, or this method will throw an exception.
|participantId||Match-local ID of the participant to retrieve status for.|
- The participant corresponding to the given ID.
Get the participant ID for a given player. This will only return a non-null ID if the player is actually a participant in the room and that player's identity is visible to the current player. Note that this will always return non-null for the current player.
|playerId||Player ID to find participant ID for.|
- The participant ID corresponding to given player, or null if none found.
Get the IDs of the participants of the given room.
- The IDs of the participants in this room. These are returned in the participant order of the room. Note that these are not stable across rooms.
public int getParticipantStatus (String participantId)
Get the status of a participant in a room. Note that the participant ID must correspond to a participant in this room, or this method will throw an exception.
|participantId||Room-local ID of the participant to retrieve status for.|
public ArrayList<Participant> getParticipants ()
public String getRoomId ()
public int getStatus ()
public int getVariant ()
public int hashCode ()
public boolean isDataValid ()
Check to see if this object is valid for use. If the object is still volatile, this method
will indicate whether or not the object can be safely used. The output of a call to
freeze() will always be valid.
- whether or not the object is valid for use.