001/**
002 *
003 * Copyright 2003-2007 Jive Software.
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018package org.jivesoftware.smackx.workgroup.agent;
019
020import java.util.Date;
021import java.util.Set;
022
023import org.jivesoftware.smackx.workgroup.QueueUser;
024
025public interface QueueUsersListener {
026
027    /**
028     * The status of the queue was updated.
029     *
030     * @param queue the workgroup queue.
031     * @param status the status of queue.
032     */
033    void statusUpdated(WorkgroupQueue queue, WorkgroupQueue.Status status);
034
035    /**
036     * The average wait time of the queue was updated.
037     *
038     * @param queue the workgroup queue.
039     * @param averageWaitTime the average wait time of the queue.
040     */
041    void averageWaitTimeUpdated(WorkgroupQueue queue, int averageWaitTime);
042
043    /**
044     * The date of oldest entry waiting in the queue was updated.
045     *
046     * @param queue the workgroup queue.
047     * @param oldestEntry the date of the oldest entry waiting in the queue.
048     */
049    void oldestEntryUpdated(WorkgroupQueue queue, Date oldestEntry);
050
051    /**
052     * The list of users waiting in the queue was updated.
053     *
054     * @param queue the workgroup queue.
055     * @param users the list of users waiting in the queue.
056     */
057    void usersUpdated(WorkgroupQueue queue, Set<QueueUser> users);
058}