import com.collager.trillo.pojo.Result;
import com.collager.trillo.pojo.ScriptParameter;
import com.collager.trillo.util.Loggable;
import com.collager.trillo.util.TrilloFunction;
- Everything is private except handle() method
- return any object and it will become the response payload
- Make sure that returned object is serializable.
public class MyFunction implements Loggable, TrilloFunction {
This is the only entry point into this Trillo function
- params : complete context passed by the application
including request body map (V).
public Object handle(ScriptParameter params) {
log().warn(Arrays.toString(e.getStackTrace()));
return Result.getFailedResult(e.getMessage());
private Object _handle(ScriptParameter params) {
// insert the correct biz logic