org.asteriskjava.live.AsteriskQueueEntry Maven / Gradle / Ivy
Show all versions of asterisk-java Show documentation
package org.asteriskjava.live;
import java.util.Date;
/**
* Represents a member of a queue.
* PropertyChangeEvents are fired for the following properties:
*
* - state
*
- position
*
- reportedPosition
*
*
* @author gmi
*/
public interface AsteriskQueueEntry extends LiveObject {
String PROPERTY_STATE = "state";
String PROPERTY_POSITION = "position";
String PROPERTY_REPORTED_POSITION = "reportedPosition";
int POSITION_UNDETERMINED = -1;
/**
* Returns the date this member joined the Queue.
* This property is immutable.
*
* @return the date this member joined the Queue
*/
Date getDateJoined();
/**
* Returns the date this member left the queue room.
* This property is null
as long as the user is
* in state {@link QueueEntryState#JOINED} and set to date the
* member left when entering {@link QueueEntryState#LEFT}.
*
* @return the date this member left the Queue or
* null
if the user did not yet leave.
*/
Date getDateLeft();
/**
* Returns the lifecycle status of this AsteriskQueueEntry.
* Initially the user is in state {@link org.asteriskjava.live.QueueEntryState#JOINED}.
*
* @return the lifecycle status of this AsteriskQueueEntry.
*/
QueueEntryState getState();
/**
* Returns the Queue this member joined.
* This property is immutable.
*
* @return the Queue this entry joined.
*/
AsteriskQueue getQueue();
/**
* Returns the channel associated with this entry.
* This property is immutable.
*
* @return the channel associated with this entry.
*/
AsteriskChannel getChannel();
/**
* Returns the name of the channel associated with this entry.
* Comodity bridge, don't duplicate channel name as it can be renamed.
*
* @return the name of the channel associated with this entry.
*/
String getChannelName();
/**
* Returns the position of this queue entry in the queue.
*
* @return the name of the channel associated with this entry.
*/
int getPosition();
}