public class AgentRoster extends Object
AgentSession.getAgentRoster()
Modifier and Type | Method and Description |
---|---|
void |
addListener(AgentRosterListener listener)
Adds a listener to this roster.
|
boolean |
contains(Jid jid)
Returns true if the specified XMPP address is an agent in the workgroup.
|
int |
getAgentCount()
Returns a count of all agents in the workgroup.
|
Set<EntityBareJid> |
getAgents()
Returns all agents (String JID values) in the workgroup.
|
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.
|
void |
reload()
Reloads the entire roster from the server.
|
void |
removeListener(AgentRosterListener listener)
Removes a listener from this roster.
|
public void reload() throws SmackException.NotConnectedException, InterruptedException
public void addListener(AgentRosterListener listener)
listener
- an agent roster listener.public void removeListener(AgentRosterListener listener)
listener
- a roster listener.public int getAgentCount()
public Set<EntityBareJid> getAgents()
public boolean contains(Jid jid)
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").public Presence getPresence(Jid user)
user
- a fully qualified xmpp JID. The address could be in any valid format (e.g.
"domain/resource", "user@domain" or "user@domain/resource").