Asterisk-Java

org.asteriskjava.manager.action
Class QueueAddAction

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

public class QueueAddAction
extends AbstractManagerAction

The QueueAddAction adds a new member to a queue.

It is implemented in apps/app_queue.c

The memberName property was added in Asterisk 1.4, the stateInterface property in Asterisk 1.6.

Version:
$Id: QueueAddAction.java 1145 2008-08-20 16:57:45Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
QueueAddAction()
          Creates a new empty QueueAddAction.
QueueAddAction(java.lang.String queue, java.lang.String iface)
          Creates a new QueueAddAction that adds a new member on the given interface to the given queue.
QueueAddAction(java.lang.String queue, java.lang.String iface, java.lang.Integer penalty)
          Creates a new QueueAddAction that adds a new member on the given interface to the given queue with the given penalty.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getInterface()
          Returns the name of the channel to dial to reach this member.
 java.lang.String getMemberName()
          Returns the name of the queue memeber (agent name).
 java.lang.Boolean getPaused()
          Returns if the queue member should be paused when added.
 java.lang.Integer getPenalty()
          Returns the penalty for this member.
 java.lang.String getQueue()
          Returns the name of the queue the new member will be added to.
 java.lang.String getStateInterface()
          Returns the name of the channel from which to read devicestate changes.
 void setInterface(java.lang.String iface)
          Sets the name of the channel (Technology/Location) to dial to reach this member.
 void setMemberName(java.lang.String memberName)
          Sets the name of the queue memeber (agent name).
 void setPaused(java.lang.Boolean paused)
          Sets if the queue member should be paused when added.
 void setPenalty(java.lang.Integer penalty)
          Sets the penalty for this member.
 void setQueue(java.lang.String queue)
          Sets the name of the queue the new member will be added to.
 void setStateInterface(java.lang.String stateInterface)
          Sets the name of the channel (Technology/Location) from which to read devicestate changes.
 
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

QueueAddAction

public QueueAddAction()
Creates a new empty QueueAddAction.


QueueAddAction

public QueueAddAction(java.lang.String queue,
                      java.lang.String iface)
Creates a new QueueAddAction that adds a new member on the given interface to the given queue.

Parameters:
queue - the name of the queue the new member will be added to
iface - Sets the interface to add. To add a specific channel just use the channel name, e.g. "SIP/1234".
Since:
0.2

QueueAddAction

public QueueAddAction(java.lang.String queue,
                      java.lang.String iface,
                      java.lang.Integer penalty)
Creates a new QueueAddAction that adds a new member on the given interface to the given queue with the given penalty.

Parameters:
queue - the name of the queue the new member will be added to
iface - Sets the interface to add. To add a specific channel just use the channel name, e.g. "SIP/1234".
penalty - the penalty for this member. The penalty must be a positive integer or 0 for no penalty. When calls are distributed members with higher penalties are considered last.
Since:
0.2
Method Detail

getAction

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

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction

getQueue

public java.lang.String getQueue()
Returns the name of the queue the new member will be added to.

Returns:
the name of the queue the new member will be added to.

setQueue

public void setQueue(java.lang.String queue)
Sets the name of the queue the new member will be added to.

This property is mandatory.

Parameters:
queue - the name of the queue the new member will be added to.

getInterface

public java.lang.String getInterface()
Returns the name of the channel to dial to reach this member.

Returns:
the name of the channel to dial to reach this member.

setInterface

public void setInterface(java.lang.String iface)
Sets the name of the channel (Technology/Location) to dial to reach this member.

This property is mandatory.

Parameters:
iface - the name of the channel to dial to reach this member, e.g. "SIP/1234".

getPenalty

public java.lang.Integer getPenalty()
Returns the penalty for this member.

Returns:
the penalty for this member.

setPenalty

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

The penalty must be a positive integer or 0 for no penalty. If it is not set 0 is assumed.

When calls are distributed members with higher penalties are considered last.

Parameters:
penalty - the penalty for this member.

getPaused

public java.lang.Boolean getPaused()
Returns if the queue member should be paused when added.

Returns:
Boolean.TRUE if the queue member should be paused when added.
Since:
0.2

setPaused

public void setPaused(java.lang.Boolean paused)
Sets if the queue member should be paused when added.

Parameters:
paused - Boolean.TRUE if the queue member should be paused when added.
Since:
0.2

getMemberName

public java.lang.String getMemberName()
Returns the name of the queue memeber (agent name).

Available since Asterisk 1.4

Returns:
the name of the queue memeber (agent name).
Since:
1.0.0

setMemberName

public void setMemberName(java.lang.String memberName)
Sets the name of the queue memeber (agent name).

Available since Asterisk 1.4

Parameters:
memberName - the name of the queue memeber (agent name).
Since:
1.0.0

getStateInterface

public java.lang.String getStateInterface()
Returns the name of the channel from which to read devicestate changes.

Available since Asterisk 1.6

Returns:
the name of the channel from which to read devicestate changes.
Since:
1.0.0

setStateInterface

public void setStateInterface(java.lang.String stateInterface)
Sets the name of the channel (Technology/Location) from which to read devicestate changes.

Available since Asterisk 1.6

Parameters:
stateInterface - the name of the channel from which to read devicestate changes.
Since:
1.0.0

Asterisk-Java

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