Class SandboxServerContext
- java.lang.Object
-
- com.atlassian.confluence.impl.util.sandbox.SandboxServerContext
-
- All Implemented Interfaces:
SandboxTaskContext
public class SandboxServerContext extends Object implements SandboxTaskContext
- Since:
- 6.10
-
-
Constructor Summary
Constructors Constructor Description SandboxServerContext(InputStream inputStream, OutputStream outputStream, PrintStream errorStream, Level logLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
Rexecute(SandboxCallback<T,R> callback, T input)
Calls the givenSandboxCallback
.void
log(Level level, Object message)
Logs a message so it will be available for consuming bySandboxErrorConsumer
in the host.com.atlassian.confluence.impl.util.sandbox.SandboxMessage
receiveMessage()
void
sendMessage(com.atlassian.confluence.impl.util.sandbox.SandboxMessage message)
void
sendStartMarker()
-
-
-
Constructor Detail
-
SandboxServerContext
public SandboxServerContext(InputStream inputStream, OutputStream outputStream, PrintStream errorStream, Level logLevel)
-
-
Method Detail
-
execute
public <T,R> R execute(SandboxCallback<T,R> callback, T input)
Description copied from interface:SandboxTaskContext
Calls the givenSandboxCallback
.- Specified by:
execute
in interfaceSandboxTaskContext
- Type Parameters:
T
- the input type ofSandboxCallback
R
- the output type ofSandboxCallback
-
log
public void log(Level level, Object message)
Description copied from interface:SandboxTaskContext
Logs a message so it will be available for consuming bySandboxErrorConsumer
in the host.- Specified by:
log
in interfaceSandboxTaskContext
-
sendMessage
public void sendMessage(com.atlassian.confluence.impl.util.sandbox.SandboxMessage message)
-
receiveMessage
public com.atlassian.confluence.impl.util.sandbox.SandboxMessage receiveMessage()
-
sendStartMarker
public void sendStartMarker()
-
-