You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by ms...@apache.org on 2002/07/17 03:42:14 UTC
cvs commit: jakarta-jmeter/src_1/org/apache/jmeter/functions Function.java
mstover1 2002/07/16 18:42:13
Modified: src_1/org/apache/jmeter/functions Function.java
Log:
Updating javadocs
Revision Changes Path
1.2 +31 -0 jakarta-jmeter/src_1/org/apache/jmeter/functions/Function.java
Index: Function.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src_1/org/apache/jmeter/functions/Function.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Function.java 17 Jul 2002 01:27:46 -0000 1.1
+++ Function.java 17 Jul 2002 01:42:13 -0000 1.2
@@ -13,12 +13,43 @@
*/
public interface Function {
+ /**
+ * Given the previous SampleResult and the current Sampler, return
+ * a string to use as a replacement value for the function call.
+ * Assume "setParameter" was previously called.
+ *
+ * This method must be threadsafe - multiple threads will be using
+ * the same object.
+ */
public String execute(SampleResult previousResult,Sampler currentSampler)
throws InvalidVariableException;
+ /**
+ * A string representing a comma-delimited list of URLEncoded arguments.
+ * You will have to split on the comma, and decode each argument.
+ * Extend AbstractFunction to gain access to a convenience method
+ * that does that for you. These parameters are used to "configure"
+ * your function.
+ */
public void setParameters(String parameters) throws InvalidVariableException;
+ /**
+ * Return the name of your function. Convention is to prepend "__"
+ * to the name (ie "__regexFunction")
+ */
public String getReferenceKey();
+ /**
+ * Return a list of strings briefly describing each parameter
+ * your function takes. Please use JMeterUtils.getResString(resource_name)
+ * to grab a resource string. Otherwise, your help text will be
+ * difficult to internationalize. Add your strings to all
+ * org.apache.jmeter.resources.*.properties files. Do not worry
+ * about translating - that's someone else's responsibility.
+ *
+ * This list is not optional. If you don't wish to write help, you
+ * must at least return a List containing the correct number of
+ * blank strings, one for each argument.
+ */
public List getArgumentDesc();
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>