Enum RosterPacket.ItemType

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      both
      The user and the contact have subscriptions to each other's presence (also called a "mutual subscription").
      from
      The contact has a subscription to the user's presence, but the user does not have a subscription to the contact's presence.
      none
      The user does not have a subscription to the contact's presence, and the contact does not have a subscription to the user's presence; this is the default value, so if the subscription attribute is not included then the state is to be understood as "none".
      remove
      The user wishes to stop receiving presence updates from the subscriber.
      to
      The user has a subscription to the contact's presence, but the contact does not have a subscription to the user's presence.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String asSymbol()
      Get a String containing symbols representing the item type.
      static RosterPacket.ItemType fromString​(java.lang.String string)  
      static RosterPacket.ItemType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RosterPacket.ItemType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • none

        public static final RosterPacket.ItemType none
        The user does not have a subscription to the contact's presence, and the contact does not have a subscription to the user's presence; this is the default value, so if the subscription attribute is not included then the state is to be understood as "none".
      • to

        public static final RosterPacket.ItemType to
        The user has a subscription to the contact's presence, but the contact does not have a subscription to the user's presence.
      • from

        public static final RosterPacket.ItemType from
        The contact has a subscription to the user's presence, but the user does not have a subscription to the contact's presence.
      • both

        public static final RosterPacket.ItemType both
        The user and the contact have subscriptions to each other's presence (also called a "mutual subscription").
    • Method Detail

      • values

        public static RosterPacket.ItemType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RosterPacket.ItemType c : RosterPacket.ItemType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RosterPacket.ItemType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • asSymbol

        public java.lang.String asSymbol()
        Get a String containing symbols representing the item type. The first symbol in the string is a big dot, representing the local entity. The second symbol represents the established subscription relation and is typically an arrow. The head(s) of the arrow point in the direction presence messages are sent. For example, if there is only a head pointing to the big dot, then the local user will receive presence information from the remote entity.
        Returns:
        the symbolic representation of this item type.