mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Initial check-in.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2369 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
2aaccd0dec
commit
5d656558fd
26 changed files with 3599 additions and 0 deletions
60
source/org/jivesoftware/smackx/workgroup/agent/Agent.java
Normal file
60
source/org/jivesoftware/smackx/workgroup/agent/Agent.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package org.jivesoftware.smackx.workgroup.agent;
|
||||
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
|
||||
/**
|
||||
* An Agent represents the agent role in a Workgroup Queue.
|
||||
*/
|
||||
public class Agent {
|
||||
|
||||
private String user;
|
||||
private int maxChats = -1;
|
||||
private int currentChats = -1;
|
||||
private Presence presence = null;
|
||||
|
||||
/**
|
||||
* Creates an Agent
|
||||
* @param user - the current agents JID
|
||||
* @param currentChats - the number of chats the agent is in.
|
||||
* @param maxChats - the maximum number of chats the agent is allowed.
|
||||
* @param presence - the agents presence
|
||||
*/
|
||||
public Agent( String user, int currentChats, int maxChats, Presence presence ) {
|
||||
this.user = user;
|
||||
this.currentChats = currentChats;
|
||||
this.maxChats = maxChats;
|
||||
this.presence = presence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the agents JID
|
||||
* @return - the agents JID.
|
||||
*/
|
||||
public String getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the maximum number of chats for this agent.
|
||||
* @return - maximum number of chats allowed.
|
||||
*/
|
||||
public int getMaxChats() {
|
||||
return maxChats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current chat count.
|
||||
* @return - the current chat count.
|
||||
*/
|
||||
public int getCurrentChats() {
|
||||
return currentChats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the agents <code>Presence</code>
|
||||
* @return - the agents presence.
|
||||
*/
|
||||
public Presence getPresence() {
|
||||
return presence;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue