net.sf.asterisk.manager.event
Class DNDStateEvent

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

public class DNDStateEvent
extends ManagerEvent

A DNDStateEvent is triggered by the Zap channel driver when a channel enters or leaves DND (do not disturb) state.
It is implemented in channels/chan_zap.c.
Available since Asterisk 1.2

Since:
0.2
Version:
$Id: DNDStateEvent.java,v 1.3 2005/08/28 12:20:53 srt Exp $
Author:
srt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DNDStateEvent(java.lang.Object source)
          Creates a new DNDStateEvent.
 
Method Summary
 java.lang.String getChannel()
          Returns the name of the channel.
 java.lang.String getState()
          Returns DND state of the channel.
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setState(java.lang.String state)
          Sets the DND state of the channel.
 
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

DNDStateEvent

public DNDStateEvent(java.lang.Object source)
Creates a new DNDStateEvent.

Parameters:
source -
Method Detail

getChannel

public java.lang.String getChannel()
Returns the name of the channel. The channel name is of the form "Zap/<channel number>".


setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel.


getState

public java.lang.String getState()
Returns DND state of the channel.

Returns:
"enabled" if do not disturb is on, "disabled" if it is off.

setState

public void setState(java.lang.String state)
Sets the DND state of the channel.



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