net.sf.asterisk.fastagi.command
Class ExecCommand

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

public class ExecCommand
extends AGICommand

Executes an application with the given options.
Returns whatever the application returns, or -2 if the application was not found.

Version:
$Id: ExecCommand.java,v 1.4 2005/04/10 07:44:48 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
ExecCommand(java.lang.String application)
          Creates a new ExecCommand.
ExecCommand(java.lang.String application, java.lang.String options)
          Creates a new ExecCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getApplication()
          Returns the name of the application to execute.
 java.lang.String getOptions()
          Returns the options to pass to the application.
 void setApplication(java.lang.String application)
          Sets the name of the application to execute.
 void setOptions(java.lang.String options)
          Sets the options to pass to the application.
 
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

ExecCommand

public ExecCommand(java.lang.String application)
Creates a new ExecCommand.

Parameters:
application - the name of the application to execute.

ExecCommand

public ExecCommand(java.lang.String application,
                   java.lang.String options)
Creates a new ExecCommand.

Parameters:
application - the name of the application to execute.
options - the options to pass to the application.
Method Detail

getApplication

public java.lang.String getApplication()
Returns the name of the application to execute.

Returns:
the name of the application to execute.

setApplication

public void setApplication(java.lang.String application)
Sets the name of the application to execute.

Parameters:
application - the name of the application to execute.

getOptions

public java.lang.String getOptions()
Returns the options to pass to the application.

Returns:
the options to pass to the application.

setOptions

public void setOptions(java.lang.String options)
Sets the options to pass to the application.

Parameters:
options - the options to pass to the application.

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.