Asterisk-Java

org.asteriskjava.fastagi.command
Class ReceiveTextCommand

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

public class ReceiveTextCommand
extends AbstractAgiCommand

Receives a string of text on a channel.

Specify timeout to be the maximum time to wait for input in milliseconds, or 0 for infinite.

Most channels do not support the reception of text.

Returns -1 for failure or 1 for success, and the string in parentheses.

Available since Asterisk 1.2.

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

Constructor Summary
ReceiveTextCommand()
          Creates a new ReceiveTextCommand with a default timeout of 0 meaning to wait for ever.
ReceiveTextCommand(int timeout)
          Creates a new ReceiveTextCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 int getTimeout()
          Returns the milliseconds to wait for the channel to receive the text.
 void setTimeout(int timeout)
          Sets the milliseconds to wait for the channel to receive the text.
 
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

ReceiveTextCommand

public ReceiveTextCommand()
Creates a new ReceiveTextCommand with a default timeout of 0 meaning to wait for ever.


ReceiveTextCommand

public ReceiveTextCommand(int timeout)
Creates a new ReceiveTextCommand.

Parameters:
timeout - the milliseconds to wait for the channel to receive the text.
Method Detail

getTimeout

public int getTimeout()
Returns the milliseconds to wait for the channel to receive the text.

Returns:
the milliseconds to wait for the channel to receive the text.

setTimeout

public void setTimeout(int timeout)
Sets the milliseconds to wait for the channel to receive the text.

Parameters:
timeout - the milliseconds to wait for the channel to receive the text.

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.