sfs2x.client.requests
Class MessageRecipientMode

java.lang.Object
  extended by sfs2x.client.requests.MessageRecipientMode

public class MessageRecipientMode
extends java.lang.Object

This class is used to specify the recipient mode for Moderator Messages and Administrator Message. There are 4 recipient modes:

Version:
SFS2X
See Also:
ModeratorMessageRequest, AdminMessageRequest

Field Summary
static int TO_GROUP
          The moderator/administrator message will be sent to all the clients who subscribed a specific Room Group.
static int TO_ROOM
          The moderator/administrator message will be sent to all the users in a specific Room.
static int TO_USER
          The moderator/administrator message will be sent to a specific user.
static int TO_ZONE
          The moderator/administrator message will be sent to all the users in the Zone.
 
Constructor Summary
MessageRecipientMode(int mode, java.lang.Object target)
           
 
Method Summary
 int getMode()
          Returns the selected recipient mode.
 java.lang.Object getTarget()
          Returns the moderator/administrator message target, according to the selected recipient mode.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TO_USER

public static final int TO_USER
The moderator/administrator message will be sent to a specific user. A User instance must be passed as target parameter to the class constructor.

See Also:
User, Constant Field Values

TO_ROOM

public static final int TO_ROOM
The moderator/administrator message will be sent to all the users in a specific Room. A Room instance must be passed as target parameter to the class constructor.

See Also:
Room, Constant Field Values

TO_GROUP

public static final int TO_GROUP
The moderator/administrator message will be sent to all the clients who subscribed a specific Room Group. A Group id must be passed as target parameter to the class constructor.

See Also:
Room.getGroupId(), Constant Field Values

TO_ZONE

public static final int TO_ZONE
The moderator/administrator message will be sent to all the users in the Zone. null can be passed as target parameter, in fact it will be ignored.

See Also:
Room.getGroupId(), Constant Field Values
Constructor Detail

MessageRecipientMode

public MessageRecipientMode(int mode,
                            java.lang.Object target)
Parameters:
mode - the recipient mode
target - the target, depending on the specified recipient mode, as explained in the Class overview
Method Detail

getMode

public int getMode()
Returns the selected recipient mode.


getTarget

public java.lang.Object getTarget()
Returns the moderator/administrator message target, according to the selected recipient mode.