org.apache.jmeter.util

Class BeanShellInterpreter


public class BeanShellInterpreter
extends Object

BeanShell setup function - encapsulates all the access to the BeanShell Interpreter in a single class. The class uses dynamic class loading to access BeanShell, which means that all the source files can be built without needing access to the bsh jar. If the beanshell jar is not present at run-time, an error will be logged

Constructor Summary

BeanShellInterpreter()
BeanShellInterpreter(String init, Logger _log)

Method Summary

Object
eval(String s)
Object
evalNoLog(String s)
Object
get(String s)
static boolean
isInterpreterPresent()
void
reset()
Resets the BeanShell interpreter.
Object
set(String s, Object o)
Object
set(String s, boolean b)
Object
source(String s)

Constructor Details

BeanShellInterpreter

public BeanShellInterpreter()
            throws ClassNotFoundException

BeanShellInterpreter

public BeanShellInterpreter(String init,
                            Logger _log)
            throws ClassNotFoundException
Parameters:
init - initialisation file
_log - logger to pass to interpreter

Method Details

eval

public Object eval(String s)
            throws JMeterException

evalNoLog

public Object evalNoLog(String s)
            throws JMeterException

get

public Object get(String s)
            throws JMeterException

isInterpreterPresent

public static boolean isInterpreterPresent()

reset

public void reset()
            throws ClassNotFoundException
Resets the BeanShell interpreter.

set

public Object set(String s,
                  Object o)
            throws JMeterException

set

public Object set(String s,
                  boolean b)
            throws JMeterException

source

public Object source(String s)
            throws JMeterException

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