Asterisk-Java

org.asteriskjava.fastagi.command
Class ExecCommand

java.lang.Object
  extended by org.asteriskjava.fastagi.command.AbstractAgiCommand
      extended by org.asteriskjava.fastagi.command.ExecCommand
All Implemented Interfaces:
java.io.Serializable, AgiCommand

public class ExecCommand
extends AbstractAgiCommand

Executes an application with the given options.

Returns whatever the application returns, or -2 if the application was not found.

Version:
$Id: ExecCommand.java 938 2007-12-31 03:23:38Z srt $
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 org.asteriskjava.fastagi.command.AbstractAgiCommand
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. Multiple options are separated by the pipe character ('|').

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

buildCommand

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

Specified by:
buildCommand in interface AgiCommand
Specified by:
buildCommand in class AbstractAgiCommand
Returns:
a string suitable to be sent to asterisk.

Asterisk-Java

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