public class CodeRunnerClient extends Object
RequestHandlingServerCode on a code runner server.
Using startCode(RequestHandlingServerCode, ClassMapBuilder), a piece
of code can be sent to the server where it is started. A session id is
returned, which can then be used to send requests to the server code, as long
as the code is running.
The transport mechanism is pluggable by using a custom
message sender. By default, communication
happens via HTTP POST requests.
| Modifier and Type | Class and Description |
|---|---|
static class |
CodeRunnerClient.ClassMapBuilder |
| Constructor and Description |
|---|
CodeRunnerClient() |
CodeRunnerClient(Function<byte[],byte[]> messageSender) |
CodeRunnerClient(String endPoint) |
| Modifier and Type | Method and Description |
|---|---|
Function<byte[],byte[]> |
getRequestSender() |
boolean |
isConnectionWorking() |
void |
setRequestSender(Function<byte[],byte[]> requestSender) |
RequestChannel |
startCode(RequestHandlingServerCode remoteCode,
CodeRunnerClient.ClassMapBuilder bootstrapClasses) |
public CodeRunnerClient()
public CodeRunnerClient(String endPoint)
public CodeRunnerClient(Function<byte[],byte[]> messageSender)
public RequestChannel startCode(RequestHandlingServerCode remoteCode, CodeRunnerClient.ClassMapBuilder bootstrapClasses)
public Function<byte[],byte[]> getRequestSender()
public void setRequestSender(Function<byte[],byte[]> requestSender)
public boolean isConnectionWorking()
Copyright © 2015. All rights reserved.