Commit c7143a43 authored by Vít Kabele's avatar Vít Kabele

Instrumentation bytes passing to request processor.

parent 6ce14667
......@@ -116,7 +116,7 @@ final class ConnectionHandler implements Runnable {
off += delivery.getSizes (i);
credentials.Instrumentations.add (bytes);
}
credentials.Processor = RequestProcessor.newInstance ();
credentials.Processor = RequestProcessor.newInstance (credentials.Instrumentations);
credentials.State = SessionCredentials.SessionState.READY;
response = ServerMessage
......
......@@ -223,17 +223,6 @@ public final class DiSLServer {
}
private static RequestProcessor __getRequestProcessorOrDie () {
try {
return RequestProcessor.newInstance ();
} catch (final Exception e) {
__die (e, "failed to initialize request processor");
throw new AssertionError ("unreachable");
}
}
private static void __closeSocket (final Closeable socket) {
try {
socket.close ();
......
......@@ -7,6 +7,7 @@ import java.io.StringWriter;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;
import java.util.UUID;
......@@ -177,7 +178,15 @@ final class RequestProcessor {
//
public static RequestProcessor newInstance () throws DiSLException {
/**
* Creates new instance of RequestProcessor class.
*
* @param Intrumentations List of bytearrays representing instrumentation jars.
* @return New instance of RequestProcessor
* @throws DiSLException
*/
public static RequestProcessor newInstance (List<byte[]> Intrumentations) throws DiSLException {
// TODO LB: Configure bypass on a per-request basis.
if (disableBypass) {
System.setProperty ("disl.disablebypass", "true");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment