net.sf.asterisk.fastagi.command
Class VerboseCommand

java.lang.Object
  extended by net.sf.asterisk.fastagi.command.AGICommand
      extended by net.sf.asterisk.fastagi.command.VerboseCommand
All Implemented Interfaces:
java.io.Serializable

public class VerboseCommand
extends AGICommand

Sends a message to the console via the verbose message system.
Always returns 1.

Version:
$Id: VerboseCommand.java,v 1.3 2005/03/10 21:48:11 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
VerboseCommand(java.lang.String message, int level)
          Creates a new VerboseCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 int getLevel()
          Returns the level to use.
 java.lang.String getMessage()
          Returns the message to send.
 void setLevel(int level)
          Sets the level to use.
 void setMessage(java.lang.String message)
          Sets the message to send.
 
Methods inherited from class net.sf.asterisk.fastagi.command.AGICommand
escapeAndQuote, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VerboseCommand

public VerboseCommand(java.lang.String message,
                      int level)
               throws java.lang.IllegalArgumentException
Creates a new VerboseCommand.

Parameters:
message - the message to send.
level - the verbosity level to use.
Must be in [1..4]
Throws:
java.lang.IllegalArgumentException - if level is not in [1..4]
Method Detail

getMessage

public java.lang.String getMessage()
Returns the message to send.

Returns:
the message to send.

setMessage

public void setMessage(java.lang.String message)
Sets the message to send.

Parameters:
message - the message to send.

getLevel

public int getLevel()
Returns the level to use.

Returns:
the level to use.

setLevel

public void setLevel(int level)
Sets the level to use.

Parameters:
level - the level to use.
Throws:
java.lang.IllegalArgumentException - if level is not in [1..4]

buildCommand

public java.lang.String buildCommand()
Description copied from class: AGICommand
Returns a string suitable to be sent to asterisk.

Specified by:
buildCommand in class AGICommand
Returns:
a string suitable to be sent to asterisk.


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