|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asterisk.fastagi.command.AGICommand net.sf.asterisk.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. This attribute is mandatory. |
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 net.sf.asterisk.fastagi.command.AGICommand |
---|
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.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.maxDigits
- the maximum number of digits to read.java.lang.IllegalArgumentException
- if maxDigits is not in [1..1024]Method Detail |
---|
public java.lang.String getFile()
public void setFile(java.lang.String file)
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.public int getMaxDigits()
public void setMaxDigits(int maxDigits) throws java.lang.IllegalArgumentException
maxDigits
- the maximum number of digits to read.java.lang.IllegalArgumentException
- if maxDigits is not in [1..1024]public java.lang.String buildCommand()
AGICommand
buildCommand
in class AGICommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |