jess
Interface Userfunction

All Known Implementing Classes:
Batch, Deffunction, Help

public interface Userfunction

Interface for all functions, user-defined or otherwise, callable from the Jess language. For every Jess function, a class implementing this interface is defined. You can implement this interface and then call Rete.addUserfunction(jess.Userfunction) to add your function to Jess.

(C) 2005 Sandia National Laboratories


Method Summary
 Value call(ValueVector vv, Context context)
          Call this function with the given argument list.
 java.lang.String getName()
          Return the name of this function.
 

Method Detail

getName

public java.lang.String getName()
Return the name of this function. Called once when the function is installed into a Rete engine.

Returns:
The name of this function, as seen by the Jess language

call

public Value call(ValueVector vv,
                  Context context)
           throws JessException
Call this function with the given argument list. The arguments will be unresolved - do not pass them to other functions or return them as a result without calling resolveValue() on them!

Parameters:
vv - The argument list. The function name will be the 0th element.
context - The execution context for resolving arguments.
Returns:
The result of executing this function.
Throws:
JessException - If anything goes wrong.
See Also:
Value.resolveValue(jess.Context)

© 2006 Sandia Corporation