Class RemoteRosterEntry


  • public class RemoteRosterEntry
    extends java.lang.Object
    Represents a roster item, which consists of a JID and , their name and the groups the roster item belongs to. This roster item does not belong to the local roster. Therefore, it does not persist in the server.

    The idea of a RemoteRosterEntry is to be used as part of a roster exchange.

    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteRosterEntry​(Jid user, java.lang.String name, java.lang.String[] groups)
      Creates a new remote roster entry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getGroupArrayNames()
      Returns a String array for the group names that the roster entry belongs to.
      java.util.Iterator<java.lang.String> getGroupNames()
      Returns an Iterator for the group names (as Strings) that the roster entry belongs to.
      java.lang.String getName()
      Returns the user's name.
      Jid getUser()
      Returns the user.
      java.lang.String toXML()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RemoteRosterEntry

        public RemoteRosterEntry​(Jid user,
                                 java.lang.String name,
                                 java.lang.String[] groups)
        Creates a new remote roster entry.
        Parameters:
        user - the user.
        name - the user's name.
        groups - the list of group names the entry will belong to, or null if the the roster entry won't belong to a group.
    • Method Detail

      • getUser

        public Jid getUser()
        Returns the user.
        Returns:
        the user.
      • getName

        public java.lang.String getName()
        Returns the user's name.
        Returns:
        the user's name.
      • getGroupNames

        public java.util.Iterator<java.lang.String> getGroupNames()
        Returns an Iterator for the group names (as Strings) that the roster entry belongs to.
        Returns:
        an Iterator for the group names.
      • getGroupArrayNames

        public java.lang.String[] getGroupArrayNames()
        Returns a String array for the group names that the roster entry belongs to.
        Returns:
        a String[] for the group names.
      • toXML

        public java.lang.String toXML()