Class MessageRecipientMode


  • public class MessageRecipientMode
    extends java.lang.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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      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

      Constructors 
      Constructor Description
      MessageRecipientMode​(int mode, java.lang.Object target)
      Creates a new MessageRecipientMode instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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)
        Creates a new MessageRecipientMode instance. The instance must be passed as recipientMode parameter to the ModeratorMessageRequest() and AdminMessageRequest() classes constructors.
        Parameters:
        mode - 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:
        ModeratorMessageRequest, AdminMessageRequest
    • 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.