Package sfs3.client.requests
Class ExtensionRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.ExtensionRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
Sends a command to the server-side Extension attached to the Zone or to a Room.
This request is used to send custom commands from the client to a server-side Extension, be it a Zone-level or Room-level Extension. Also, the extensionResponse event is used by the server to send Extension commands/responses to the client.
Read the SmartFoxServer 3 documentation about server-side Extension for more informations.
By default ExtensionRequest is sent via TCP but it's also possible to use UDP protocol instead, provided a UDP connection is already established. (see the SmartFox.isUdpConnected()).
- 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
ConstructorsConstructorDescriptionExtensionRequest(String extCmd) ExtensionRequest(String extCmd, ISFSObject params) ExtensionRequest(String extCmd, ISFSObject params, Room room) ExtensionRequest(String extCmd, ISFSObject params, Room room, TransportType txType) Creates a new ExtensionRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_CMD
- See Also:
- Internal
-
KEY_PARAMS
- See Also:
- Internal
-
KEY_ROOM
- See Also:
- Internal
-
-
Constructor Details
-
ExtensionRequest
Creates a new ExtensionRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
extCmd- The name of the command which identifies an action that should be executed by the server-side Extension.params- An instance of SFSObject containing custom data to be sent to the Extension. Can be null if no data needs to be sent.room- Ifnull, the specified command is sent to the current Zone server-side Extension; if notnull, the command is sent to the server-side Extension attached to the passed Room.txType- specify the protocol to use. Default is TCP.- See Also:
-
ExtensionRequest
- See Also:
-
ExtensionRequest
- See Also:
-
ExtensionRequest
- See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-