Class JoinRoomInvitationRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
-
Field Summary
Fields inherited from class sfs3.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, BanUsersFromRoom, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, ClusterInviteUsers, ClusterJoinOrCreate, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GameServerConnectionRequired, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, JoinRoomInvite, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, QuickJoinOrCreateRoom, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserPosition, SetUserVariables, sfso, SpectatorToPlayer, SubscribeRoomGroup, targetController, UdpInit, UnsubscribeRoomGroup -
Constructor Summary
ConstructorsConstructorDescriptionJoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames) Sends an invitation to other users/players to join a specific Room.JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames, ISFSObject params, int expirySeconds) JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames, ISFSObject params, int expirySeconds, boolean asSpectator) -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Constructor Details
-
JoinRoomInvitationRequest
Sends an invitation to other users/players to join a specific Room.Invited users receive the invitation as an invitation event dispatched to their clients: they can accept or refuse it by means of the InvitationReplyRequest request, which must be sent within the specified amount of time.
Depending on the Room's settings the invitation can be sent by the Room's owner only or by any other user. This behavior can be set via the RoomSettings.allowOwnerOnlyInvitation parameter.
NOTE: spectators in a Game Room are not allowed to invite other users; only players are.
An invitation can also specify the amount of time given to each invitee to reply. Default is 30 seconds. A positive answer will attempt to join the user in the designated Room. For Game Rooms the asSpectator flag can be toggled to join the invitee as player or spectator (default = player).
There aren't any specific notifications sent back to the inviter after the invitee's response. Users that have accepted the invitation will join the Room while those who didn't reply or turned down the invitation won't generate any event. In order to send specific messages (e.g. chat), just send a private message back to the inviter.
The following example invites two more users in the current game:
- Since:
- 1.7.0
- See Also:
-
JoinRoomInvitationRequest
public JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames, ISFSObject params, int expirySeconds) -
JoinRoomInvitationRequest
public JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames, ISFSObject params, int expirySeconds, boolean asSpectator)
-
-
Method Details
-
validate
- Throws:
SFSValidationException
-
execute
- Throws:
SFSException
-