Packagecom.smartfoxserver.v2.requests
Classpublic class MessageRecipientMode
InheritanceMessageRecipientMode Inheritance Object

The MessageRecipientMode class is used to specify the recipient/s of moderator and administrator messages. Read the constants descriptions for more informations.

See also

ModeratorMessageRequest
AdminMessageRequest


Public Properties
 PropertyDefined By
  mode : int
[read-only] Returns the selected recipient mode.
MessageRecipientMode
  target : *
[read-only] Returns the moderator/administrator message target, according to the selected recipient mode.
MessageRecipientMode
Public Methods
 MethodDefined By
  
MessageRecipientMode(mode:int, target:*)
Creates a new MessageRecipientMode instance.
MessageRecipientMode
Public Constants
 ConstantDefined By
  TO_GROUP : int = 2
[static] The moderator/administrator message will be sent to all the clients who subscribed a specific Room Group.
MessageRecipientMode
  TO_ROOM : int = 1
[static] The moderator/administrator message will be sent to all the users in a specific Room.
MessageRecipientMode
  TO_USER : int = 0
[static] The moderator/administrator message will be sent to a specific user.
MessageRecipientMode
  TO_ZONE : int = 3
[static] The moderator/administrator message will be sent to all the users in the Zone.
MessageRecipientMode
Property Detail
modeproperty
mode:int  [read-only]

Returns the selected recipient mode.


Implementation
    public function get mode():int
targetproperty 
target:*  [read-only]

Returns the moderator/administrator message target, according to the selected recipient mode.


Implementation
    public function get target():*
Constructor Detail
MessageRecipientMode()Constructor
public function MessageRecipientMode(mode:int, target:*)

Creates a new MessageRecipientMode instance. The instance must be passed as recipientMode parameter to the ModeratorMessageRequest() and AdminMessageRequest() classes constructors.

Parameters
mode:int — One of the constants contained in this class, describing the recipient mode.
 
target:* — The moderator/administrator message recipient/s, according to the selected recipient mode.

See also

Constant Detail
TO_GROUPConstant
public static const TO_GROUP:int = 2

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

TO_ROOMConstant 
public static const TO_ROOM:int = 1

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

TO_USERConstant 
public static const TO_USER:int = 0

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

TO_ZONEConstant 
public static const TO_ZONE:int = 3

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.