Data object representing the data for a room. This is immutable, and therefore 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
Field Summary
public static final Creator<RoomEntity> | CREATOR |
Public Method Summary
boolean | |
Room |
freeze()
|
Bundle |
getAutoMatchCriteria()
Retrieves the automatch criteria used to create or join this room, if any.
|
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.
|
long | |
String | |
String | |
void | |
Participant | |
String | |
ArrayList<String> |
getParticipantIds()
Get the IDs of the participants of the given room.
|
int | |
ArrayList<Participant> |
getParticipants()
Retrieve the
Participant s
for this object.
|
String | |
int | |
int | |
int |
hashCode()
|
boolean | |
void |
setShouldDowngrade(boolean arg0)
|
String |
toString()
|
void |
writeToParcel(Parcel dest, int
flags)
|
Protected Method Summary
static boolean |
canUnparcelSafely(String arg0)
|
static Integer | |
abstract boolean |
prepareForClientVersion(int arg0)
|
boolean |
Inherited Method Summary
Fields
public static final Creator<RoomEntity> CREATOR
Public Methods
public boolean equals (Object obj)
public Room freeze ()
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.
Returns
- 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.
Returns
- 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 CharArrayBuffer
.
Parameters
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.
Parameters
participantId | Match-local ID of the participant to retrieve status for. |
---|
Returns
- The participant corresponding to the given ID.
public String getParticipantId (String playerId)
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.
Parameters
playerId | Player ID to find participant ID for. |
---|
Returns
- The participant ID corresponding to given player, or null if none found.
public ArrayList<String> getParticipantIds ()
Get the IDs of the participants of the given room.
Returns
- 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.
Parameters
participantId | Room-local ID of the participant to retrieve status for. |
---|
Returns
- The current status of the participant in this room. One of
STATUS_INVITED
,STATUS_JOINED
,STATUS_DECLINED
, orSTATUS_LEFT
.
public ArrayList<Participant> getParticipants ()
Retrieve the Participant
s
for this object. This is a list of all Participants applicable to the given object.
Returns
- A list of
Participant
s for this object.