Class AgentRoster

    • Method Detail

      • addListener

        public void addListener​(AgentRosterListener listener)
        Adds a listener to this roster. The listener will be fired anytime one or more changes to the roster are pushed from the server.
        Parameters:
        listener - an agent roster listener.
      • removeListener

        public void removeListener​(AgentRosterListener listener)
        Removes a listener from this roster. The listener will be fired anytime one or more changes to the roster are pushed from the server.
        Parameters:
        listener - a roster listener.
      • getAgentCount

        public int getAgentCount()
        Returns a count of all agents in the workgroup.
        Returns:
        the number of agents in the workgroup.
      • getAgents

        public Set<EntityBareJidgetAgents()
        Returns all agents (String JID values) in the workgroup.
        Returns:
        all entries in the roster.
      • contains

        public boolean contains​(Jid jid)
        Returns true if the specified XMPP address is an agent in the workgroup.
        Parameters:
        jid - the XMPP address of the agent (eg "jsmith@example.com"). The address can be in any valid format (e.g. "domain/resource", "user@domain" or "user@domain/resource").
        Returns:
        true if the XMPP address is an agent in the workgroup.
      • getPresence

        public Presence getPresence​(Jid user)
        Returns the presence info for a particular agent, or null if the agent is unavailable (offline) or if no presence information is available.

        Parameters:
        user - a fully qualified xmpp JID. The address could be in any valid format (e.g. "domain/resource", "user@domain" or "user@domain/resource").
        Returns:
        the agent's current presence, or null if the agent is unavailable or if no presence information is available..