Asterisk-Java

org.asteriskjava.live
Interface AsteriskQueueMember

All Superinterfaces:
LiveObject

public interface AsteriskQueueMember
extends LiveObject

A queue member. Queue Member can be an agent or a direkt sip account, eg. a Phone.

PropertyChangeEvents are fired for the following properties:

Since:
0.3.1
Version:
$Id: AsteriskQueueMember.java 1159 2008-08-27 17:52:12Z srt $
Author:
Patrick Breucking

Field Summary
static java.lang.String PROPERTY_PAUSED
           
static java.lang.String PROPERTY_PENALTY
           
static java.lang.String PROPERTY_STATE
           
 
Method Summary
 java.lang.String getLocation()
          Returns the location of this member.
 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.
 boolean getPaused()
          Deprecated. as of 1.0.0. Use isPaused() instead.
 java.lang.Integer getPenalty()
          Returns the penalty of this member.
 AsteriskQueue getQueue()
          Returns the queue this member is registerd to.
 QueueMemberState getState()
          Returns the state of this member.
 boolean isDynamic()
          Convenience method that checks whether this member has been dynamically added by the QueueAdd command.
 boolean isPaused()
          Returns whether this member is currently paused..
 boolean isStatic()
          Convenience method that checks whether this member has been statically defined in queues.conf.
 void setPaused(boolean paused)
          Pauses or unpauses this member on this queue.
 void setPausedAll(boolean paused)
          Pauses or unpauses this member on all queues.
 void setPenalty(int penalty)
          Assignes a new penalty to this queue member.
 
Methods inherited from interface org.asteriskjava.live.LiveObject
addPropertyChangeListener, addPropertyChangeListener, getServer, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROPERTY_STATE

static final java.lang.String PROPERTY_STATE
See Also:
Constant Field Values

PROPERTY_PENALTY

static final java.lang.String PROPERTY_PENALTY
See Also:
Constant Field Values

PROPERTY_PAUSED

static final java.lang.String PROPERTY_PAUSED
See Also:
Constant Field Values
Method Detail

getLocation

java.lang.String getLocation()
Returns the location of this member.

Returns:
the location of this member.

getQueue

AsteriskQueue getQueue()
Returns the queue this member is registerd to.

Returns:
the queue this member is registerd to.

getState

QueueMemberState getState()
Returns the state of this member.

Returns:
the state of this member.

getPaused

boolean getPaused()
Deprecated. as of 1.0.0. Use isPaused() instead.

Returns whether this member is currently paused..

Returns:
paused true is this queue member is paused, false otherwise.

isPaused

boolean isPaused()
Returns whether this member is currently paused..

Returns:
paused true is this queue member is paused, false otherwise.
Since:
1.0.0

setPaused

void setPaused(boolean paused)
               throws ManagerCommunicationException,
                      NoSuchInterfaceException
Pauses or unpauses this member on this queue.

Parameters:
paused - true to pause this member, false to unpause.
Throws:
ManagerCommunicationException - if the QueuePauseAction could not be send to Asterisk.
NoSuchInterfaceException - if the interface or the queue do not exist.
Since:
1.0.0

setPausedAll

void setPausedAll(boolean paused)
                  throws ManagerCommunicationException,
                         NoSuchInterfaceException
Pauses or unpauses this member on all queues.

Parameters:
paused - true to pause this member, false to unpause.
Throws:
ManagerCommunicationException - if the QueuePauseAction could not be send to Asterisk.
NoSuchInterfaceException - if the interface or the queue do not exist.
Since:
1.0.0

getMembership

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.
Since:
1.0.0

isStatic

boolean isStatic()
Convenience method that checks whether this member has been statically defined in queues.conf.

Returns:
true if this member has been statically defined in queues.conf, false otherwise.
Since:
1.0.0

isDynamic

boolean isDynamic()
Convenience method that checks whether this member has been dynamically added by the QueueAdd command.

Returns:
true if this member has been dynamically added by the QueueAdd command, false otherwise.
Since:
1.0.0

getPenalty

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

Returns:
the penalty of this member.
Since:
1.0.0

setPenalty

void setPenalty(int penalty)
                throws java.lang.IllegalArgumentException,
                       ManagerCommunicationException,
                       InvalidPenaltyException
Assignes a new penalty to this queue member.

Available since Asterisk 1.6.

Parameters:
penalty - the new penalty value, must not be negative.
Throws:
java.lang.IllegalArgumentException - if the penalty is negative.
ManagerCommunicationException - if the QueuePenaltyAction could not be send to Asterisk.
InvalidPenaltyException - if Asterisk refused to set the new penalty.
Since:
1.0.0

Asterisk-Java

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