public class ReceiveCharCommand extends AbstractAgiCommand
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 the decimal value of the character if one is received, or 0 if the channel does not support text reception. Returns -1 only on error/hangup.
| Constructor and Description |
|---|
ReceiveCharCommand()
Creates a new ReceiveCharCommand with a default timeout of 0 meaning to
wait for ever.
|
ReceiveCharCommand(int timeout)
Creates a new ReceiveCharCommand.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
int |
getTimeout()
Returns the milliseconds to wait for the channel to receive a character.
|
void |
setTimeout(int timeout)
Sets the milliseconds to wait for the channel to receive a character.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic ReceiveCharCommand()
public ReceiveCharCommand(int timeout)
timeout - the milliseconds to wait for the channel to receive a
character.public int getTimeout()
public void setTimeout(int timeout)
timeout - the milliseconds to wait for the channel to receive a
character.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2021. All rights reserved.