org.apache.jmeter.functions

Class LogFunction2

Implemented Interfaces:
Function

public class LogFunction2
extends AbstractFunction

Function to log a message.

Parameters:

Returns: - Empty String (so can be used where return value would be a nuisance)

Constructor Summary

LogFunction2()

Method Summary

String
execute(SampleResult previousResult, Sampler currentSampler)
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save
List
getArgumentDesc()
Return a list of strings briefly describing each parameter your function takes.
String
getReferenceKey()
void
setParameters(Collection parameters)
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save

Methods inherited from class org.apache.jmeter.functions.AbstractFunction

checkMinParameterCount, checkParameterCount, checkParameterCount, execute, execute, getReferenceKey, getVariables, setParameters

Constructor Details

LogFunction2

public LogFunction2()

Method Details

execute

public String execute(SampleResult previousResult,
                      Sampler currentSampler)
            throws InvalidVariableException
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save
Specified by:
execute in interface Function
Overrides:
execute in interface AbstractFunction

getArgumentDesc

public List getArgumentDesc()
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. 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.
Specified by:
getArgumentDesc in interface Function

getReferenceKey

public String getReferenceKey()
Specified by:
getReferenceKey in interface Function
Overrides:
getReferenceKey in interface AbstractFunction

setParameters

public void setParameters(Collection parameters)
            throws InvalidVariableException
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save
Specified by:
setParameters in interface Function
Overrides:
setParameters in interface AbstractFunction

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.