net.sf.asterisk.manager.event
Class QueueMemberEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sf.asterisk.manager.event.ManagerEvent
          extended by net.sf.asterisk.manager.event.ResponseEvent
              extended by net.sf.asterisk.manager.event.QueueMemberEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
QueueMemberStatusEvent

public class QueueMemberEvent
extends ResponseEvent

A QueueMemberEvent is triggered in response to a QueueStatusAction and contains information about a member of a queue.
It is implemented in apps/app_queue.c

Version:
$Id: QueueMemberEvent.java,v 1.4 2005/08/28 09:39:50 srt Exp $
Author:
srt
See Also:
QueueStatusAction, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
QueueMemberEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.Integer getCallsTaken()
          Returns the number of calls answered by the member.
 java.lang.Long getLastCall()
          Returns the time the last successful call answered by the added member was hungup.
 java.lang.String getLocation()
          Returns the name of the member's interface.
E.g.
 java.lang.String getMembership()
          Returns if this member has been dynamically added by the QueueAdd command (in the dialplan or via the Manager API) or if this member is has been statically defined in queues.conf.
 java.lang.Boolean getPaused()
          Is this queue member paused (not accepting calls)?
Available since Asterisk 1.2.
 java.lang.Integer getPenalty()
          Returns the penalty for the added member.
 java.lang.String getQueue()
          Returns the name of the queue.
 java.lang.Integer getStatus()
          Returns the status of this queue member.
Available since Asterisk 1.2
Valid status codes are: AST_DEVICE_UNKNOWN (0) Queue member is available AST_DEVICE_NOT_INUSE (1) ? AST_DEVICE_INUSE (2) ? AST_DEVICE_BUSY (3) ? AST_DEVICE_INVALID (4) ? AST_DEVICE_UNAVAILABLE (5) ?
 void setCallsTaken(java.lang.Integer callsTaken)
          Sets the number of calls answered by the added member.
 void setLastCall(java.lang.Long lastCall)
          Sets the time the last successful call answered by this member was hungup.
 void setLocation(java.lang.String location)
          Sets the name of the member's interface.
 void setMembership(java.lang.String membership)
          Sets if this member has been dynamically or statically added.
 void setPaused(java.lang.Boolean paused)
          Sets if this member has been paused.
 void setPenalty(java.lang.Integer penalty)
          Sets the penalty for this member.
 void setQueue(java.lang.String queue)
          Sets the name of the queue.
 void setStatus(java.lang.Integer status)
          Sets the status of this queue member.
 
Methods inherited from class net.sf.asterisk.manager.event.ResponseEvent
getActionId, getInternalActionId, setActionId, setInternalActionId
 
Methods inherited from class net.sf.asterisk.manager.event.ManagerEvent
getDateReceived, getPrivilege, setDateReceived, setPrivilege, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueueMemberEvent

public QueueMemberEvent(java.lang.Object source)
Parameters:
source -
Method Detail

getQueue

public java.lang.String getQueue()
Returns the name of the queue.

Returns:
the name of the queue.

setQueue

public void setQueue(java.lang.String queue)
Sets the name of the queue.

Parameters:
queue - the name of the queue.

getLocation

public java.lang.String getLocation()
Returns the name of the member's interface.
E.g. the channel name or agent group.

Returns:
the name of the member's interface.

setLocation

public void setLocation(java.lang.String location)
Sets the name of the member's interface.

Parameters:
member - the name of the member's interface.

getMembership

public java.lang.String getMembership()
Returns if this member has been dynamically added by the QueueAdd command (in the dialplan or via the Manager API) or if this member is has been statically defined in queues.conf.

Returns:
"dynamic" if the added member is a dynamic queue member, "static" if the added member is a static queue member.

setMembership

public void setMembership(java.lang.String membership)
Sets if this member has been dynamically or statically added.

Parameters:
membership - "dynamic" if the added member is a dynamic queue member, "static" if the added member is a static queue member.

getPenalty

public java.lang.Integer getPenalty()
Returns the penalty for the added member. When calls are distributed members with higher penalties are considered last.

Returns:
the penalty for the added member.

setPenalty

public void setPenalty(java.lang.Integer penalty)
Sets the penalty for this member.

Parameters:
penalty - the penalty for this member.

getCallsTaken

public java.lang.Integer getCallsTaken()
Returns the number of calls answered by the member.

Returns:
the number of calls answered by the member.

setCallsTaken

public void setCallsTaken(java.lang.Integer callsTaken)
Sets the number of calls answered by the added member.

Parameters:
callsTaken - the number of calls answered by the added member.

getLastCall

public java.lang.Long getLastCall()
Returns the time the last successful call answered by the added member was hungup.

Returns:
the time (in seconds since 01/01/1970) the last successful call answered by the added member was hungup.

setLastCall

public void setLastCall(java.lang.Long lastCall)
Sets the time the last successful call answered by this member was hungup.

Parameters:
lastCall - the time (in seconds since 01/01/1970) the last successful call answered by the added member was hungup.

getStatus

public java.lang.Integer getStatus()
Returns the status of this queue member.
Available since Asterisk 1.2
Valid status codes are:
AST_DEVICE_UNKNOWN (0)
Queue member is available
AST_DEVICE_NOT_INUSE (1)
?
AST_DEVICE_INUSE (2)
?
AST_DEVICE_BUSY (3)
?
AST_DEVICE_INVALID (4)
?
AST_DEVICE_UNAVAILABLE (5)
?

Returns:
the status of this queue member or null if this attribute is not supported by your version of Asterisk.
Since:
0.2

setStatus

public void setStatus(java.lang.Integer status)
Sets the status of this queue member.

Parameters:
the - status of this queue member
Since:
0.2

getPaused

public java.lang.Boolean getPaused()
Is this queue member paused (not accepting calls)?
Available since Asterisk 1.2.

Returns:
Boolean.TRUE if this member has been paused, Boolean.FALSE if not or null if pausing is not supported by your version of Asterisk.
Since:
0.2

setPaused

public void setPaused(java.lang.Boolean paused)
Sets if this member has been paused.

Since:
0.2


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.