[Asterisk-java-cvs] CVS: asterisk-java/src/java/net/sf/asterisk/fastagi AGIRequest.java,1.1,1.2
Brought to you by:
srt
From: Stefan R. <sr...@us...> - 2005-04-06 18:59:09
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695/src/java/net/sf/asterisk/fastagi Modified Files: AGIRequest.java Log Message: Added parameters to AGIRequest Index: AGIRequest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/AGIRequest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AGIRequest.java 5 Mar 2005 22:46:59 -0000 1.1 +++ AGIRequest.java 6 Apr 2005 18:59:00 -0000 1.2 @@ -16,8 +16,9 @@ */ package net.sf.asterisk.fastagi; +import java.util.Map; + /** - * * @author srt * @version $Id$ */ @@ -31,9 +32,11 @@ public interface AGIRequest String getScript(); /** - * Returns the full URL of the requestURL in the form agi://host[:port][/script]. + * Returns the full URL of the requestURL in the form + * agi://host[:port][/script]. * - * @return the full URL of the requestURL in the form agi://host[:port][/script]. + * @return the full URL of the requestURL in the form + * agi://host[:port][/script]. */ String getRequestURL(); @@ -84,23 +87,29 @@ public interface AGIRequest String getRdnis(); /** - * Returns the context in the dial plan from which the AGI script was called. + * Returns the context in the dial plan from which the AGI script was + * called. * - * @return the context in the dial plan from which the AGI script was called. + * @return the context in the dial plan from which the AGI script was + * called. */ String getContext(); /** - * Returns the extension in the dial plan from which the AGI script was called. + * Returns the extension in the dial plan from which the AGI script was + * called. * - * @return the extension in the dial plan from which the AGI script was called. + * @return the extension in the dial plan from which the AGI script was + * called. */ String getExtension(); /** - * Returns the priority in the dial plan from which the AGI script was called. + * Returns the priority in the dial plan from which the AGI script was + * called. * - * @return the priority in the dial plan from which the AGI script was called. + * @return the priority in the dial plan from which the AGI script was + * called. */ Integer getPriority(); @@ -108,7 +117,8 @@ public interface AGIRequest * Returns wheather this agi is passed audio (EAGI - Enhanced AGI).<br> * Enhanced AGI is currently not supported on FastAGI. * - * @return Boolean.TRUE if this agi is passed audio, Boolean.FALSE otherwise. + * @return Boolean.TRUE if this agi is passed audio, Boolean.FALSE + * otherwise. */ Boolean getEnhanced(); @@ -118,4 +128,41 @@ public interface AGIRequest * @return the account code set for the call. */ String getAccountCode(); + + /** + * Returns the value of a request parameter as a String, or + * <code>null</code> if the parameter does not exist. You should only use + * this method when you are sure the parameter has only one value.<br> + * If the parameter might have more than one value, use + * {@see #getParameterValues(String)}.<br> + * If you use this method with a multivalued parameter, the value returned + * is equal to the first value in the array returned by + * <code>getParameterValues</code>. + * + * @param name a String containing the name of the parameter whose value is + * requested. + * @return a String representing the single value of the parameter. + * @see #getParameterValues(String) + */ + String getParameter(String name); + + /** + * Returns an array of String objects containing all of the values the given + * request parameter has, or + * <code>null</coder> if the parameter does not exist.<br> + * If the parameter has a single value, the array has a length of 1. + * + * @param name a String containing the name of the parameter whose value is requested. + * @return an array of String objects containing the parameter's values. + */ + String[] getParameterValues(String name); + + /** + * Returns a java.util.Map of the parameters of this request. + * + * @return a java.util.Map containing parameter names as keys and parameter + * values as map values. The keys in the parameter map are of type + * String. The values in the parameter map are of type String array. + */ + Map getParameterMap(); } |