net.sf.asterisk.fastagi.command
Class SayTimeCommand

java.lang.Object
  extended by net.sf.asterisk.fastagi.command.AGICommand
      extended by net.sf.asterisk.fastagi.command.SayTimeCommand
All Implemented Interfaces:
java.io.Serializable

public class SayTimeCommand
extends AGICommand

Say a given time, returning early if any of the given DTMF digits are received on the channel.
Time is the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
Returns 0 if playback completes without a digit being pressed, or the ASCII numerical value of the digit if one was pressed or -1 on error/hangup.

Version:
$Id: SayTimeCommand.java,v 1.3 2005/03/10 21:48:11 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
SayTimeCommand(long time)
          Creates a new SayTimeCommand.
SayTimeCommand(long time, java.lang.String escapeDigits)
          Creates a new SayTimeCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getEscapeDigits()
          Returns the digits that allow the user to interrupt this command.
 long getTime()
          Returns the time to say in seconds since 00:00:00 on January 1, 1970.
 void setEscapeDigits(java.lang.String escapeDigits)
          Sets the digits that allow the user to interrupt this command.
 void setTime(long time)
          Sets the time to say in seconds since 00:00:00 on January 1, 1970.
 
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

SayTimeCommand

public SayTimeCommand(long time)
Creates a new SayTimeCommand.

Parameters:
time - the time to say in seconds since 00:00:00 on January 1, 1970.

SayTimeCommand

public SayTimeCommand(long time,
                      java.lang.String escapeDigits)
Creates a new SayTimeCommand.

Parameters:
time - the time to say in seconds since 00:00:00 on January 1, 1970.
escapeDigits - contains the digits that allow the user to interrupt this command.
Method Detail

getTime

public long getTime()
Returns the time to say in seconds since 00:00:00 on January 1, 1970.

Returns:
the time to say in seconds since 00:00:00 on January 1, 1970.

setTime

public void setTime(long time)
Sets the time to say in seconds since 00:00:00 on January 1, 1970.

Parameters:
time - the time to say in seconds since 00:00:00 on January 1, 1970.

getEscapeDigits

public java.lang.String getEscapeDigits()
Returns the digits that allow the user to interrupt this command.

Returns:
the digits that allow the user to interrupt this command.

setEscapeDigits

public void setEscapeDigits(java.lang.String escapeDigits)
Sets the digits that allow the user to interrupt this command.

Parameters:
escapeDigits - the time that allow the user to interrupt this command or null for none.

buildCommand

public java.lang.String buildCommand()
Description copied from class: AGICommand
Returns a string suitable to be sent to asterisk.

Specified by:
buildCommand in class AGICommand
Returns:
a string suitable to be sent to asterisk.


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.