Asterisk-Java

org.asteriskjava.fastagi.command
Class AbstractAgiCommand

java.lang.Object
  extended by org.asteriskjava.fastagi.command.AbstractAgiCommand
All Implemented Interfaces:
java.io.Serializable, AgiCommand
Direct Known Subclasses:
AnswerCommand, AsyncAgiBreakCommand, ChannelStatusCommand, ControlStreamFileCommand, DatabaseDelCommand, DatabaseDelTreeCommand, DatabaseGetCommand, DatabasePutCommand, ExecCommand, GetDataCommand, GetFullVariableCommand, GetOptionCommand, GetVariableCommand, HangupCommand, NoopCommand, ReceiveCharCommand, ReceiveTextCommand, RecordFileCommand, SayAlphaCommand, SayDateTimeCommand, SayDigitsCommand, SayNumberCommand, SayPhoneticCommand, SayTimeCommand, SendImageCommand, SendTextCommand, SetAutoHangupCommand, SetCallerIdCommand, SetContextCommand, SetExtensionCommand, SetMusicOffCommand, SetMusicOnCommand, SetPriorityCommand, SetVariableCommand, SpeechActivateGrammarCommand, SpeechCreateCommand, SpeechDeactivateGrammarCommand, SpeechDestroyCommand, SpeechLoadGrammarCommand, SpeechRecognizeCommand, SpeechSetCommand, SpeechUnloadGrammarCommand, StreamFileCommand, TddModeCommand, VerboseCommand, WaitForDigitCommand

public abstract class AbstractAgiCommand
extends java.lang.Object
implements java.io.Serializable, AgiCommand

Abstract base class that provides some convenience methods for implementing AgiCommand classes.

Version:
$Id: AbstractAgiCommand.java 1372 2009-10-13 04:31:20Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
AbstractAgiCommand()
           
 
Method Summary
abstract  java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
protected  java.lang.String escapeAndQuote(java.lang.String s)
          Escapes and quotes a given String according to the rules set by Asterisk's AGI.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractAgiCommand

public AbstractAgiCommand()
Method Detail

buildCommand

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

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

escapeAndQuote

protected java.lang.String escapeAndQuote(java.lang.String s)
Escapes and quotes a given String according to the rules set by Asterisk's AGI.

Parameters:
s - the String to escape and quote
Returns:
the transformed String

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Asterisk-Java

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