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 aSandboxTaskwhich 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 fromSandboxTaskbut 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rapply(SandboxCallbackContext context, T t)SandboxSerializer<T>inputSerializer()ReturnsSandboxSerializerfor the callback input.SandboxSerializer<R>outputSerializer()ReturnsSandboxSerializerfor the callback output.
-
-
-
Method Detail
-
apply
R apply(SandboxCallbackContext context, T t)
-
inputSerializer
SandboxSerializer<T> inputSerializer()
ReturnsSandboxSerializerfor the callback input.
-
outputSerializer
SandboxSerializer<R> outputSerializer()
ReturnsSandboxSerializerfor the callback output.
-
-