Asterisk-Java

org.asteriskjava.manager.action
Class QueuePenaltyAction

java.lang.Object
  extended by org.asteriskjava.manager.action.AbstractManagerAction
      extended by org.asteriskjava.manager.action.QueuePenaltyAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class QueuePenaltyAction
extends AbstractManagerAction

The QueuePenaltyAction sets the penalty for a queue member.

It is implemented in apps/app_queue.c

Available since Asterisk 1.6.

Since:
1.0.0
Version:
$Id: QueuePenaltyAction.java 963 2008-02-03 06:25:21Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
QueuePenaltyAction()
          Creates a new empty QueuePenaltyAction.
QueuePenaltyAction(java.lang.String iface, int penalty)
          Creates a new QueuePenaltyAction that sets the penalty for the given interface on all queues.
QueuePenaltyAction(java.lang.String iface, int penalty, java.lang.String queue)
          Creates a new QueuePenaltyAction that sets the penalty for the given interface on the given queue.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getInterface()
          Returns the interface of the member to set the penalty for.
 java.lang.Integer getPenalty()
          Returns the new penalty.
 java.lang.String getQueue()
          Returns the name of the queue.
 void setInterface(java.lang.String iface)
          Sets the interface of the member to set the penalty for.
 void setPenalty(java.lang.Integer penalty)
          Sets the new penalty.
 void setQueue(java.lang.String queue)
          Sets the name of the queue.
 
Methods inherited from class org.asteriskjava.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueuePenaltyAction

public QueuePenaltyAction()
Creates a new empty QueuePenaltyAction.


QueuePenaltyAction

public QueuePenaltyAction(java.lang.String iface,
                          int penalty)
Creates a new QueuePenaltyAction that sets the penalty for the given interface on all queues.

Parameters:
iface - the interface of the member to set the penalty for
penalty - new penalty value.

QueuePenaltyAction

public QueuePenaltyAction(java.lang.String iface,
                          int penalty,
                          java.lang.String queue)
Creates a new QueuePenaltyAction that sets the penalty for the given interface on the given queue.

Parameters:
iface - the interface of the member to set the penalty for
penalty - new penalty value.
queue - the queue the member is assigned the penalty for
Method Detail

getAction

public java.lang.String getAction()
Returns the name of this action, i.e. "QueuePenalty".

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction
Returns:
the name of this action.

getInterface

public java.lang.String getInterface()
Returns the interface of the member to set the penalty for.

Returns:
the interface of the member to to set the penalty for.

setInterface

public void setInterface(java.lang.String iface)
Sets the interface of the member to set the penalty for.

This property is mandatory.

Parameters:
iface - the interface of the member to to set the penalty for.

getPenalty

public java.lang.Integer getPenalty()
Returns the new penalty.

Returns:
the new penalty.

setPenalty

public void setPenalty(java.lang.Integer penalty)
Sets the new penalty.

This property is mandatory.

Parameters:
penalty - the new penalty.

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 or null for all queues.

Asterisk-Java

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