1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Code tweaks.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2374 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2004-08-17 16:18:19 +00:00 committed by mtucker
parent b1150c862d
commit 2ac43cb6e9
2 changed files with 48 additions and 45 deletions

View file

@ -55,47 +55,47 @@ package org.jivesoftware.smackx.workgroup.agent;
import java.util.Date; import java.util.Date;
/** /**
* An immutable simple class to embody the information concerning a revoked offer, this is namely * A revoked offer which contains the reason the offer was revoked, the
* the reason, the workgroup, the userJID, and the timestamp which the message was received.<br> * workgroup, the user JID, and the timestamp of the revocation.
* *
* @author loki der quaeler * @author Matt Tucker
*/ */
public class RevokedOffer { public class RevokedOffer {
protected String userID; private String userID;
protected String workgroupName; private String workgroupName;
protected String sessionID; private String sessionID;
protected String reason; private String reason;
protected Date timestamp; private Date timestamp;
/** /**
* @param uid the jid of the user for which this revocation was issued * @param userID the jid of the user for which this revocation was issued.
* @param wg the fully qualified name of the workgroup * @param workgroupName the fully qualified name of the workgroup.
* @param sid the session id attributed to this chain of packets * @param sessionID the session id attributed to this chain of packets.
* @param cause the server issued message as to why this revocation was issued * @param reason the server issued message as to why this revocation was issued.
* @param ts the timestamp at which the revocation was issued * @param timestamp the timestamp at which the revocation was issued.
*/ */
public RevokedOffer (String uid, String wg, String sid, String cause, Date ts) { public RevokedOffer(String userID, String workgroupName, String sessionID,
super(); String reason, Date timestamp)
{
this.userID = uid; this.userID = userID;
this.workgroupName = wg; this.workgroupName = workgroupName;
this.sessionID = sid; this.sessionID = sessionID;
this.reason = cause; this.reason = reason;
this.timestamp = ts; this.timestamp = timestamp;
} }
/** /**
* @return the jid of the user for which this revocation was issued * @return the jid of the user for which this rejection was issued.
*/ */
public String getUserID () { public String getUserID() {
return this.userID; return this.userID;
} }
/** /**
* @return the fully qualified name of the workgroup * @return the fully qualified name of the workgroup
*/ */
public String getWorkgroupName () { public String getWorkgroupName() {
return this.workgroupName; return this.workgroupName;
} }

View file

@ -57,6 +57,8 @@ import java.util.*;
/** /**
* A queue in a workgroup, which is a pool of agents that are routed a specific type of * A queue in a workgroup, which is a pool of agents that are routed a specific type of
* chat request. * chat request.
*
* @author Matt Tucker
*/ */
public class WorkgroupQueue { public class WorkgroupQueue {
@ -81,18 +83,18 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the name of the queue. * Returns the name of this queue.
* *
* @return the name of the queue. * @return the name of this queue.
*/ */
public String getName() { public String getName() {
return name; return name;
} }
/** /**
* Returns the status of the queue. * Returns the status of this queue.
* *
* @return the status of the queue. * @return the status of this queue.
*/ */
public Status getStatus() { public Status getStatus() {
return status; return status;
@ -103,7 +105,7 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the number of users waiting in the queue waiting to be routed to * Returns the number of users in this queue that are waiting to be routed to
* an agent. * an agent.
* *
* @return the number of users waiting in the queue. * @return the number of users waiting in the queue.
@ -116,8 +118,8 @@ public class WorkgroupQueue {
} }
/** /**
* Returns an Iterator for the users in the queue waiting to be routed to * Returns an Iterator for the users in this queue that are waiting
* an agent (QueueUser instances). * to be routed to an agent (QueueUser instances).
* *
* @return an Iterator for the users waiting in the queue. * @return an Iterator for the users waiting in the queue.
*/ */
@ -133,11 +135,11 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the average amount of time users wait in the queue before being * Returns the average amount of time users wait in this queue before being
* routed to an agent. If average wait time info isn't available, -1 will * routed to an agent. If average wait time info isn't available, -1 will
* be returned. * be returned.
* *
* @return the average wait time * @return the average wait time in this queue.
*/ */
public int getAverageWaitTime() { public int getAverageWaitTime() {
return averageWaitTime; return averageWaitTime;
@ -148,10 +150,10 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the date of the oldest request waiting in the queue. If there * Returns the date of the oldest request waiting in this queue. If there
* are no requests waiting to be routed, this method will return <tt>null</tt>. * are no requests waiting to be routed, this method will return <tt>null</tt>.
* *
* @return the date of the oldest request in the queue. * @return the date of the oldest request in this queue.
*/ */
public Date getOldestEntry() { public Date getOldestEntry() {
return oldestEntry; return oldestEntry;
@ -162,9 +164,9 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the count of the currently available agents in the queue. * Returns the count of the currently available agents in this queue.
* *
* @return the number of active agents in the queue. * @return the number of active agents in this queue.
*/ */
public int getAgentCount() { public int getAgentCount() {
synchronized (agents) { synchronized (agents) {
@ -173,9 +175,10 @@ public class WorkgroupQueue {
} }
/** /**
* Returns an Iterator the currently active agents (Agent instances). * Returns an Iterator the currently active agents (Agent instances)
* in this queue.
* *
* @return an Iterator for the active agents. * @return an Iterator for the active agents in this queue.
*/ */
public Iterator getAgents() { public Iterator getAgents() {
return Collections.unmodifiableSet(agents).iterator(); return Collections.unmodifiableSet(agents).iterator();
@ -186,9 +189,9 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the maximum number of simultaneous chats the queue can handle. * Returns the maximum number of simultaneous chats this queue can handle.
* *
* @return the max number of chats the queue can handle. * @return the max number of chats this queue can handle.
*/ */
public int getMaxChats() { public int getMaxChats() {
return maxChats; return maxChats;
@ -199,9 +202,9 @@ public class WorkgroupQueue {
} }
/** /**
* Returns the current number of active chat sessions in the queue. * Returns the current number of active chat sessions in this queue.
* *
* @return the current number of active chat sessions in the queue. * @return the current number of active chat sessions in this queue.
*/ */
public int getCurrentChats() { public int getCurrentChats() {
return currentChats; return currentChats;
@ -212,7 +215,7 @@ public class WorkgroupQueue {
} }
/** /**
* A class to represent the status of the workgroup. The possible values are: * Represents the status of the queue. The possible values are:
* *
* <ul> * <ul>
* <li>WorkgroupQueue.Status.OPEN -- the queue is active and accepting * <li>WorkgroupQueue.Status.OPEN -- the queue is active and accepting