Package sfs3.client.requests
Class LoginRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.LoginRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
Logs the current user in one of the server Zones.
Each Zone represent an independent multiuser application governed by SmartFoxServer. In order to join a Zone, a user name and password are usually required. In order to validate the user credentials, a custom login process should be implemented in the Zone's server-side Extension.
Read the SmartFoxServer 3 documentation about the login process for more informations.
If the login operation is successful, the current user receives a login event; otherwise the loginError event is fired.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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
ConstructorsConstructorDescriptionLoginRequest(String userName) LoginRequest(String userName, String password) LoginRequest(String userName, String password, String zoneName) LoginRequest(String userName, String password, String zoneName, ISFSObject params) Creates a new LoginRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_ZONE_NAME
- See Also:
- Internal
-
KEY_USER_NAME
- See Also:
- Internal
-
KEY_PASSWORD
- See Also:
- Internal
-
KEY_PARAMS
- See Also:
- Internal
-
KEY_PRIVILEGE_ID
- See Also:
- Internal
-
KEY_ID
- See Also:
- Internal
-
KEY_ROOMLIST
- See Also:
- Internal
-
KEY_RECONNECTION_SECONDS
- See Also:
- Internal
-
KEY_CLUSTER_SID
- See Also:
- Internal
-
-
Constructor Details
-
LoginRequest
Creates a new LoginRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
userName- The name to be assigned to the user. If not passed and if the Zone allows guest users, the name is generated automatically by the server.password- The user password to access the system. SmartFoxServer doesn't offer a default authentication system, so the password must be validated implementing a custom login system in the Zone's server-side Extension.zoneName- The name (case-sensitive) of the server Zone to login to; if a Zone name is not specified, the client will use the setting loaded via SmartFox.loadConfig() method.params- An instance of SFSObject containing custom parameters to be passed to the Zone Extension (requires a custom login system to be in place).- See Also:
-
LoginRequest
- See Also:
-
LoginRequest
- See Also:
-
LoginRequest
- See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-