BBjInterpreter

Description

In BBj 25.03 and higher the BBjInterpreter object provides access to selected BBj interpreter functionality through a Java API. This allows Java code to invoke interpreter-level operations such as executing BBj commands, calling BBj programs, and managing interpreter behavior without direct access to the BBj language.

Creation

Obtain a BBjInterpreter object through the following BBjAPI object method:

Return Value

Method

BBjInterpreter

getInterpreter()

Methods of BBjInterpreter

Return Value

Method

List<Object> call(String program, Object... args)
Object eval(String cmd)
Future<T> executeInInterpreterContext(Callable<T> callable)
boolean isInterpreterContext()
void processEvents()
void processPendingEvents()
void

release()

release(int exitValue)

void setErr(Object obj, String method)
void setEsc(Object obj, String method)
void waitVerb(double fractionalSeconds)

Remarks

BBjInterpreter methods need to be called from the correct interpreter context, meaning they need to be called from the same thread that created the BBjAPI while the interpreter is still running. They will throw an error if they are called from the wrong context.

See Also

BBjAPI

BBj Object Creation and Assignment

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.