net.sf.asterisk.manager.event
Class LogChannelEvent

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

public class LogChannelEvent
extends ManagerEvent

A LogChannelEvent is triggered when logging is turned on or off.
It is implemented in logger.c
Available since Asterisk 1.2

Since:
0.2
Version:
$Id: LogChannelEvent.java,v 1.2 2005/08/28 12:32:21 srt Exp $
Author:
srt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LogChannelEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getChannel()
          Returns the name of the log channel.
 java.lang.Boolean getEnabled()
          Returns if logging has been enabled or disabled.
 java.lang.Integer getReason()
          Returns the reason code for disabling logging.
 java.lang.String getReasonTxt()
          Returns the textual representation of the reason for disabling logging.
 void setChannel(java.lang.String channel)
          Sets the name of the log channel.
 void setEnabled(java.lang.Boolean enabled)
          Sets if logging has been enabled or disabled.
 void setReason(java.lang.String s)
          Sets the reason for disabling logging.
 
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

LogChannelEvent

public LogChannelEvent(java.lang.Object source)
Parameters:
source -
Method Detail

getChannel

public java.lang.String getChannel()
Returns the name of the log channel.

Returns:
the name of the log channel.

setChannel

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

Parameters:
channel - the name of the log channel.

getEnabled

public java.lang.Boolean getEnabled()
Returns if logging has been enabled or disabled.

Returns:
Boolean.TRUE if logging has been enabled, Boolean.FALSE if it has been disabled.

setEnabled

public void setEnabled(java.lang.Boolean enabled)
Sets if logging has been enabled or disabled.

Parameters:
enabled - Boolean.TRUE if logging has been enabled, Boolean.FALSE if it has been disabled.

getReason

public java.lang.Integer getReason()
Returns the reason code for disabling logging.

Returns:
the reason code for disabling logging.

getReasonTxt

public java.lang.String getReasonTxt()
Returns the textual representation of the reason for disabling logging.

Returns:
the textual representation of the reason for disabling logging.

setReason

public void setReason(java.lang.String s)
Sets the reason for disabling logging.

Parameters:
s - the reason in the form "%d - %s".


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