Package sfs3.client.requests
Class ObjectMessageRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.GenericMessageRequest
sfs3.client.requests.ObjectMessageRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
public class ObjectMessageRequest
extends sfs3.client.requests.GenericMessageRequest
Sends an object containing custom data to all users in a Room, or a subset of them.
The data object is delivered to the selected users (or all users excluding the sender) inside the target Room by means of the objectMessage event. It can be useful to send game data, like for example the target coordinates of the user's avatar in a virtual world.
- See Also:
-
Field Summary
Fields inherited from class sfs3.client.requests.GenericMessageRequest
KEY_MESSAGE, KEY_MESSAGE_TYPE, KEY_RECIPIENT, KEY_RECIPIENT_MODE, KEY_ROOM_ID, KEY_SENDER_DATA, KEY_USER_ID, KEY_XTRA_PARAMS, log, message, params, recipient, room, sendMode, type, userFields 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
ConstructorsConstructorDescriptionObjectMessageRequest(ISFSObject obj, Room targetRoom) ObjectMessageRequest(ISFSObject obj, Room targetRoom, List<User> recipients) Creates a new ObjectMessageRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.GenericMessageRequest
execute, validateMethods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Constructor Details
-
ObjectMessageRequest
Creates a new ObjectMessageRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
obj- An instance of SFSObject containing custom parameters to be sent to the message recipients.targetRoom- The Room object corresponding to the Room where the message should be dispatched; ifnull, the last Room joined by the user is used.recipients- A list of User objects corresponding to the message recipients; ifnull, the message is sent to all users in the target Room (except the sender itself).- See Also:
-
ObjectMessageRequest
- See Also:
-
ObjectMessageRequest
- See Also:
-