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.user;
019
020/**
021 * Listener interface for those that wish to be notified of workgroup queue events.
022 *
023 * @see Workgroup#addQueueListener(QueueListener)
024 * @author loki der quaeler
025 */
026public interface QueueListener {
027
028    /**
029     * The user joined the workgroup queue.
030     */
031    void joinedQueue();
032
033    /**
034     * The user departed the workgroup queue.
035     */
036    void departedQueue();
037
038    /**
039     * The user's queue position has been updated to a new value.
040     *
041     * @param currentPosition the user's current position in the queue.
042     */
043    void queuePositionUpdated(int currentPosition);
044
045    /**
046     * The user's estimated remaining wait time in the queue has been updated.
047     *
048     * @param secondsRemaining the estimated number of seconds remaining until the
049     *      the user is routed to the agent.
050     */
051    void queueWaitTimeUpdated(int secondsRemaining);
052
053}