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(String 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<String> |
getAgents()
Returns all agents (String JID values) in the workgroup.
|
Presence |
getPresence(String 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
public void addListener(AgentRosterListener listener)
listener
- an agent roster listener.public void removeListener(AgentRosterListener listener)
listener
- a roster listener.public int getAgentCount()
public Set<String> getAgents()
public boolean contains(String 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(String 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").