See: Description
Interface | Description |
---|---|
Sandbox |
A sandbox is an object responsible for running java code in an isolated OS process.
|
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. |
SandboxCallbackContext |
The execution context for a
SandboxCallback . |
SandboxConfiguration |
The configuration for a sandbox.
|
SandboxConfiguration.Builder | |
SandboxErrorConsumer |
Consumer of a single line of sandbox standard error.
|
SandboxEventConsumer |
Consumer of critical events of a sandbox process.
|
SandboxRequest |
Request to a sandbox process.
|
SandboxSerializer<T> |
Handles Serialization/deserialization input and output for
SandboxTask . |
SandboxService |
The service that creates sandbox used for an execution of unsafe code.
|
SandboxTask<T,R> |
Represents a task intended to be executed in a process sandbox.
|
SandboxTaskContext |
The execution context for a
SandboxTask . |
Class | Description |
---|---|
SandboxSerializers |
Utility methods for serialization/deserialization.
|
SandboxSerializers.CompositeByteArraySerializer | |
SandboxSerializers.DurationSerializer | |
SandboxSerializers.IntSerializer | |
SandboxSerializers.StringSerializer |
Enum | Description |
---|---|
SandboxEventType |
Important events that can happen on a sandbox instance.
|
Sandbox sandbox = sandboxService.create(SandboxConfiguration.builder()
.memoryLimitInMegabytes(512)
.concurrencyLevel(2)
.build());
The created sandbox object then can be used for running different sandbox tasks as long as they come from the same
class loader. This usually implies that to run code from an OSGI module, a sandbox needs to be created for that
module.
SandboxTask<String, String> task = new ReverseStringTask();
sandbox.submit(task, "hello world");
Each instance of a sandbox is a java process consuming substantial amount of memory and takes non negligible amount
of time to start so it is preferably created once and reused during a lifetime of Confluence.Copyright © 2003–2018 Atlassian. All rights reserved.