Asterisk-Java

org.asteriskjava.manager.event
Class DndStateEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.asteriskjava.manager.event.ManagerEvent
          extended by org.asteriskjava.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 938 2007-12-31 03:23:38Z srt $
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.Boolean getState()
          Returns DND state of the channel.
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setState(java.lang.Boolean state)
          Sets the DND state of the channel.
 
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent
getDateReceived, getPrivilege, getServer, getTimestamp, setDateReceived, setPrivilege, setServer, setTimestamp, 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.Boolean getState()
Returns DND state of the channel.

Returns:
Boolean.TRUE if do not disturb is on, Boolean.FALSE if it is off.

setState

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


Asterisk-Java

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