Search in sources :

Example 1 with RuntimeDomain

use of com.oracle.truffle.tools.chromeinspector.domains.RuntimeDomain in project graal by oracle.

the class WebSocketServer method openWebSocket.

@Override
protected NanoWSD.WebSocket openWebSocket(NanoHTTPD.IHTTPSession handshake) {
    String descriptor = handshake.getUri();
    TruffleExecutionContext context = SESSIONS.get(descriptor);
    if (log != null) {
        log.println("CLIENT ws connection opened, resource = " + descriptor + ", context = " + context);
        log.flush();
    }
    if (context != null) {
        boolean debugBreak = DEBUG_BRK.get(descriptor);
        RuntimeDomain runtime = new TruffleRuntime(context);
        DebuggerDomain debugger = new TruffleDebugger(context, debugBreak);
        ProfilerDomain profiler = new TruffleProfiler(context);
        InspectServerSession iss = new InspectServerSession(runtime, debugger, profiler, context);
        return new InspectWebSocket(handshake, iss, log);
    } else {
        return new ClosedWebSocket(handshake);
    }
}
Also used : RuntimeDomain(com.oracle.truffle.tools.chromeinspector.domains.RuntimeDomain) DebuggerDomain(com.oracle.truffle.tools.chromeinspector.domains.DebuggerDomain) TruffleExecutionContext(com.oracle.truffle.tools.chromeinspector.TruffleExecutionContext) TruffleRuntime(com.oracle.truffle.tools.chromeinspector.TruffleRuntime) TruffleDebugger(com.oracle.truffle.tools.chromeinspector.TruffleDebugger) ProfilerDomain(com.oracle.truffle.tools.chromeinspector.domains.ProfilerDomain) TruffleProfiler(com.oracle.truffle.tools.chromeinspector.TruffleProfiler)

Aggregations

TruffleDebugger (com.oracle.truffle.tools.chromeinspector.TruffleDebugger)1 TruffleExecutionContext (com.oracle.truffle.tools.chromeinspector.TruffleExecutionContext)1 TruffleProfiler (com.oracle.truffle.tools.chromeinspector.TruffleProfiler)1 TruffleRuntime (com.oracle.truffle.tools.chromeinspector.TruffleRuntime)1 DebuggerDomain (com.oracle.truffle.tools.chromeinspector.domains.DebuggerDomain)1 ProfilerDomain (com.oracle.truffle.tools.chromeinspector.domains.ProfilerDomain)1 RuntimeDomain (com.oracle.truffle.tools.chromeinspector.domains.RuntimeDomain)1