Interface SalesforceFunction<T,​R>

Type Parameters: T - The type of the InvocationEvent payload this function can handle. R - The type of the response of this function. Functional Interface: This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


@FunctionalInterface public interface SalesforceFunction<T,​R>

Main interface for Salesforce Functions written in Java.

See Also: BiFunction

Method Summary

Modifier and TypeMethodDescription
Rapply​(InvocationEvent<T> event, Context context)Applies the function to the given arguments.

Method Details

apply

R apply​(InvocationEvent<T> event, Context context) throws java.lang.Exception

Applies the function to the given arguments.

Parameters: event - The invocation event for this function application. context - The context for this function application. Returns: The result of this function application. Throws: java.lang.Exception - If an unrecoverable exception occurred during function application.