net.sf.asterisk.manager.event
Class QueueMemberAddedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sf.asterisk.manager.event.ManagerEvent
          extended by net.sf.asterisk.manager.event.AbstractQueueMemberEvent
              extended by net.sf.asterisk.manager.event.QueueMemberAddedEvent
All Implemented Interfaces:
java.io.Serializable

public class QueueMemberAddedEvent
extends AbstractQueueMemberEvent

A QueueMemberAddedEvent is triggered when a queue member is added to a queue.
It is implemented in apps/app_queue.c.
Available since Asterisk 1.2

Since:
0.2
Version:
$Id: QueueMemberAddedEvent.java,v 1.1 2005/08/28 09:45:19 srt Exp $
Author:
srt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
QueueMemberAddedEvent(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 getMembership()
          Returns if the added member is a dynamic or static queue member.
 java.lang.Boolean getPaused()
          Returns if this queue member is paused (not accepting calls).
 java.lang.Integer getPenalty()
          Returns the penalty for the added member.
 java.lang.Integer getStatus()
          Returns the status of this queue member.
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 setMembership(java.lang.String membership)
          Sets if the added member is a dynamic or static queue member.
 void setPaused(java.lang.Boolean paused)
          Sets if this member is paused.
 void setPenalty(java.lang.Integer penalty)
          Sets the penalty for this member.
 void setStatus(java.lang.Integer status)
          Sets the status of this queue member.
 
Methods inherited from class net.sf.asterisk.manager.event.AbstractQueueMemberEvent
getLocation, getQueue, setLocation, setQueue
 
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

QueueMemberAddedEvent

public QueueMemberAddedEvent(java.lang.Object source)
Method Detail

getMembership

public java.lang.String getMembership()
Returns if the added member is a dynamic or static queue member.

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 the added member is a dynamic or static queue member.

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.
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.

setStatus

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

Parameters:
the - status of this queue member

getPaused

public java.lang.Boolean getPaused()
Returns if this queue member is paused (not accepting calls).

Returns:
Boolean.TRUE if this member has been paused or Boolean.FALSE if not.

setPaused

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

Parameters:
paused - Boolean.TRUE if this member has been paused or Boolean.FALSE if not.


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