Package sfs3.client.requests
Class PrivateMessageRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.GenericMessageRequest
sfs3.client.requests.PrivateMessageRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
public class PrivateMessageRequest
extends sfs3.client.requests.GenericMessageRequest
Sends a private chat message.
The private message is dispatched to a specific User, in any server Room, or even in no Room at all. The message is delivered by means of the privateMessage event. It is also returned to the sender: this allows showing the messages in the correct order in the application interface. It is also possible to send an optional object together with the message: it can contain custom parameters useful to transmit, for example, additional data, like text font or color etc.
- 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
ConstructorsConstructorDescriptionPrivateMessageRequest(String message, int recipientId) PrivateMessageRequest(String message, int recipientId, ISFSObject params) Creates a new PrivateMessageRequest 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
-
PrivateMessageRequest
Creates a new PrivateMessageRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
message- The message to be sent to to the recipient user.recipientId- The id of the user to which the message is to be sent.params- An instance of SFSObject containing additional custom parameters to be sent to the message recipient (for example the color of the text, etc).- See Also:
-
PrivateMessageRequest
- See Also:
-