|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsfs2x.client.requests.BaseRequest
sfs2x.client.requests.SpectatorToPlayerRequest
public class SpectatorToPlayerRequest
Turns the current user from spectator to player in a Game Room.
If the operation is successful, all the users in the target Room are notified with the spectatorToPlayer event. The operation could fail if no player slots are available in the Game Room at the time of the request; in this case the spectatorToPlayerError event is dispatched to the requester's client.
Example
SFSEvent.SPECTATOR_TO_PLAYER,
SFSEvent.SPECTATOR_TO_PLAYER_ERROR,
PlayerToSpectatorRequest| Field Summary | |
|---|---|
static java.lang.String |
KEY_PLAYER_ID
*Private* |
static java.lang.String |
KEY_ROOM_ID
*Private* |
static java.lang.String |
KEY_USER_ID
*Private* |
| Fields inherited from class sfs2x.client.requests.BaseRequest |
|---|
AddBuddy, AdminMessage, AutoJoin, BanUser, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserVariables, SpectatorToPlayer, SubscribeRoomGroup, UnsubscribeRoomGroup |
| Constructor Summary | |
|---|---|
SpectatorToPlayerRequest()
|
|
SpectatorToPlayerRequest(Room targetRoom)
Creates a new SpectatorToPlayerRequest instance. |
|
| Method Summary | |
|---|---|
void |
execute(SmartFox sfs)
*Private* |
void |
validate(SmartFox sfs)
*Private* |
| Methods inherited from class sfs2x.client.requests.BaseRequest |
|---|
getId, getMessage, getTargetController, isEncrypted, setEncrypted, setId, setTargetController |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEY_ROOM_ID
public static final java.lang.String KEY_USER_ID
public static final java.lang.String KEY_PLAYER_ID
| Constructor Detail |
|---|
public SpectatorToPlayerRequest(Room targetRoom)
targetRoom - The Room object corresponding to the Room in which the spectator should be turned to player. If null, the last Room joined by the user is used.SmartFox.send(sfs2x.client.requests.IRequest),
Roompublic SpectatorToPlayerRequest()
SpectatorToPlayerRequest(Room)| Method Detail |
|---|
public void validate(SmartFox sfs)
throws sfs2x.client.exceptions.SFSValidationException
sfs2x.client.exceptions.SFSValidationExceptionpublic void execute(SmartFox sfs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||