Interface SandboxCallback<T,R>
- Type Parameters:
T- the type of the input to the taskR- the type of the result of the task
@ExperimentalApi
public interface SandboxCallback<T,R>
During the course of work a
SandboxTask which is executed in a sandbox process may need to ask the host for
a specific information or an action. This class allows us to create a piece of code to be called from
SandboxTask but executed in the host process.
As sandbox callbacks are executed in the same thread that called 'execute' method, thread local context will be shared (e.g. transactions).
The class must be public and must have a public parameter less constructor.
- Since:
- 6.10
-
Method Summary
Modifier and TypeMethodDescriptionapply(SandboxCallbackContext context, T t) ReturnsSandboxSerializerfor the callback input.ReturnsSandboxSerializerfor the callback output.
-
Method Details
-
apply
-
inputSerializer
SandboxSerializer<T> inputSerializer()ReturnsSandboxSerializerfor the callback input. -
outputSerializer
SandboxSerializer<R> outputSerializer()ReturnsSandboxSerializerfor the callback output.
-