Interface SandboxTask<T,R>
- Type Parameters:
T- the type of the input to the taskR- the type of the result of the task
@ExperimentalApi
public interface SandboxTask<T,R>
Represents a task intended to be executed in a process sandbox. To run untrusted code, we need to wrap it in a class
implementing this interface and call the task by passing it along with its input argument into
Sandbox.execute(SandboxTask, Object).
The class must be public and must have a public parameter less constructor.- Since:
- 6.9
-
Method Summary
Modifier and TypeMethodDescriptionapply(SandboxTaskContext context, T t) Applies this task to the given argument.ReturnsSandboxSerializerfor the task input.ReturnsSandboxSerializerfor the task output.
-
Method Details
-
apply
Applies this task to the given argument. -
inputSerializer
SandboxSerializer<T> inputSerializer()ReturnsSandboxSerializerfor the task input. -
outputSerializer
SandboxSerializer<R> outputSerializer()ReturnsSandboxSerializerfor the task output.
-