Asterisk-Java

org.asteriskjava.fastagi.command
Class SendTextCommand

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

public class SendTextCommand
extends AbstractAgiCommand

Sends the given text on a channel.

Most channels do not support the transmission of text.

Returns 0 if text is sent, or if the channel does not support text transmission. Returns -1 only on error/hangup.

Version:
$Id: SendTextCommand.java 938 2007-12-31 03:23:38Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
SendTextCommand(java.lang.String text)
          Creates a new SendTextCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getText()
          Returns the text to send.
 void setText(java.lang.String text)
          Sets the text to send.
 
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

SendTextCommand

public SendTextCommand(java.lang.String text)
Creates a new SendTextCommand.

Parameters:
text - the text to send.
Method Detail

getText

public java.lang.String getText()
Returns the text to send.

Returns:
the text to send.

setText

public void setText(java.lang.String text)
Sets the text to send.

Parameters:
text - the text to send.

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.