|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.asteriskjava.fastagi.command.AbstractAgiCommand
org.asteriskjava.fastagi.command.GetDataCommand
public class GetDataCommand
Stream the given file, and recieve DTMF data. The user may interrupt the streaming by starting to enter digits.
Returns the digits recieved from the channel at the other end.
Input ends when the timeout is reached, the maximum number of digits is read or the user presses #.
Constructor Summary | |
---|---|
GetDataCommand(java.lang.String file)
Creates a new GetDataCommand with default timeout and maxDigits set to 1024. |
|
GetDataCommand(java.lang.String file,
long timeout)
Creates a new GetDataCommand with the given timeout and maxDigits set to 1024. |
|
GetDataCommand(java.lang.String file,
long timeout,
int maxDigits)
Creates a new GetDataCommand with the given timeout and maxDigits. |
Method Summary | |
---|---|
java.lang.String |
buildCommand()
Returns a string suitable to be sent to asterisk. |
java.lang.String |
getFile()
Returns the name of the file to stream. |
int |
getMaxDigits()
Returns the maximum number of digits to read. |
long |
getTimeout()
Returns the timeout to wait for data. |
void |
setFile(java.lang.String file)
Sets the name of the file to stream. |
void |
setMaxDigits(int maxDigits)
Sets the maximum number of digits to read. |
void |
setTimeout(long timeout)
Sets the timeout to wait for data. |
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 |
---|
public GetDataCommand(java.lang.String file)
file
- the name of the file to stream, must not include extension.public GetDataCommand(java.lang.String file, long timeout)
file
- the name of the file to stream, must not include extension.timeout
- the timeout in milliseconds to wait for data.0 means standard timeout value, -1 means "ludicrous time" (essentially never times out).
public GetDataCommand(java.lang.String file, long timeout, int maxDigits) throws java.lang.IllegalArgumentException
file
- the name of the file to stream, must not include extension.timeout
- the timeout in milliseconds to wait for data.0 means standard timeout value, -1 means "ludicrous time" (essentially never times out).
maxDigits
- the maximum number of digits to read.Must be in [1..1024].
java.lang.IllegalArgumentException
- if maxDigits is not in [1..1024]Method Detail |
---|
public java.lang.String getFile()
public void setFile(java.lang.String file)
This attribute is mandatory.
file
- the name of the file to stream, must not include extension.public long getTimeout()
public void setTimeout(long timeout)
timeout
- the timeout in milliseconds to wait for data.0 means standard timeout value, -1 means "ludicrous time" (essentially never times out).
public int getMaxDigits()
public void setMaxDigits(int maxDigits) throws java.lang.IllegalArgumentException
maxDigits
- the maximum number of digits to read.Must be in [1..1024].
java.lang.IllegalArgumentException
- if maxDigits is not in [1..1024]public java.lang.String buildCommand()
AgiCommand
buildCommand
in interface AgiCommand
buildCommand
in class AbstractAgiCommand
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |