Package sfs3.client.requests.buddylist
Class BuddyMessageRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.GenericMessageRequest
sfs3.client.requests.buddylist.BuddyMessageRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
public class BuddyMessageRequest
extends sfs3.client.requests.GenericMessageRequest
Sends a message to a buddy in the current user's buddies list.
Messages sent to buddies using the BuddyMessageRequest request are similar to the standard private messages (see the PrivateMessageRequest request) but are specifically designed for the Buddy List system: they don't require any Room parameter, nor they require that users joined a Room. Additionally, buddy messages are subject to specific validation, such as making sure that the recipient is in the sender's buddies list and the sender is not blocked by the recipient.
If the operation is successful, a buddyMessage event is dispatched in both the sender and recipient clients.
NOTE: this request can be sent if the Buddy List system was previously initialized only (see the InitBuddyListRequest request description).
- 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
ConstructorsConstructorDescriptionBuddyMessageRequest(String message, Buddy targetBuddy) BuddyMessageRequest(String message, Buddy targetBuddy, ISFSObject params) Creates a new BuddyMessageRequest 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
-
BuddyMessageRequest
- See Also:
-
BuddyMessageRequest
Creates a new BuddyMessageRequest 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 a buddy.targetBuddy- The Buddy object corresponding to the message recipient.params- An instance of SFSObject containing additional custom parameters (e.g. the message color, an emoticon id, etc).- See Also:
-