Package sfs3.client.requests
Class KickUserRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.KickUserRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
Kicks a user out of the server.
The current user must have administration or moderation privileges in order to be able to kick another user (see the User.privilegeId property). The request allows sending a message to the kicked user (to make clear the reason of the following disconnection) which is delivered by means of the moderatorMessage event.
Differently from the user being banned (see the BanUserRequest request), a kicked user will be able to reconnect to the SmartFoxServer instance immediately.
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionKickUserRequest(int userId) KickUserRequest(int userId, String message) KickUserRequest(int userId, String message, int delaySeconds) Creates a new KickUserRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_USER_ID
- See Also:
- Internal
-
KEY_MESSAGE
- See Also:
- Internal
-
KEY_DELAY
- See Also:
- Internal
-
-
Constructor Details
-
KickUserRequest
Creates a new KickUserRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
userId- The id of the user to be kicked.message- A custom message to be delivered to the user before kicking him; ifnull, the default message configured in the SmartFoxServer 3 Administration Tool is used.delaySeconds- The number of seconds after which the user is kicked after receiving the kick message.- See Also:
-
KickUserRequest
- See Also:
-
KickUserRequest
public KickUserRequest(int userId) - See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-