java.lang.Object | |
↳ | com.google.android.gms.games.multiplayer.realtime.RoomEntity |
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.
[Expand]
Inherited Constants | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| ||||||||||||||||||||||||||
From interface
com.google.android.gms.games.multiplayer.realtime.Room
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Freeze a volatile representation into an immutable representation.
| |||||||||||
Retrieves the automatch criteria used to create or join this room, if any.
| |||||||||||
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.
| |||||||||||
Loads the room description into the given
CharArrayBuffer . | |||||||||||
Get the participant ID for a given player.
| |||||||||||
Get the status of a participant in a room.
| |||||||||||
Retrieve the
Participant s for this object. | |||||||||||
Check to see if this object is valid for use.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||||||||||||||||||||||||||
From interface
android.os.Parcelable
| |||||||||||||||||||||||||||||||||||
From interface
com.google.android.gms.common.data.Freezable
| |||||||||||||||||||||||||||||||||||
From interface
com.google.android.gms.games.multiplayer.Participatable
| |||||||||||||||||||||||||||||||||||
From interface
com.google.android.gms.games.multiplayer.realtime.Room
|
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.
Retrieves the automatch criteria used to create or join this room, if any. May be null if the room has no automatch properties.
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.
Loads the room description into the given CharArrayBuffer
.
dataOut | The buffer to load the data into. |
---|
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. |
---|
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. |
---|
STATUS_INVITED
, STATUS_JOINED
,
STATUS_DECLINED
, or STATUS_LEFT
.Retrieve the Participant
s for this object. This is a list of all Participants
applicable to the given object.
Participant
s for this object.
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.