Search in sources :

Example 1 with SiddhiDebugger

use of io.siddhi.core.debugger.SiddhiDebugger in project siddhi by wso2.

the class SiddhiAppRuntimeImpl method debug.

public synchronized SiddhiDebugger debug() {
    siddhiDebugger = new SiddhiDebugger(siddhiAppContext);
    List<StreamRuntime> streamRuntime = new ArrayList<>();
    List<OutputCallback> streamCallbacks = new ArrayList<>();
    for (QueryRuntime queryRuntime : queryProcessorMap.values()) {
        streamRuntime.add(((QueryRuntimeImpl) queryRuntime).getStreamRuntime());
        streamCallbacks.add(((QueryRuntimeImpl) queryRuntime).getOutputCallback());
    }
    for (StreamRuntime streamRuntime1 : streamRuntime) {
        for (SingleStreamRuntime singleStreamRuntime : streamRuntime1.getSingleStreamRuntimes()) {
            singleStreamRuntime.getProcessStreamReceiver().setSiddhiDebugger(siddhiDebugger);
        }
    }
    for (OutputCallback callback : streamCallbacks) {
        callback.setSiddhiDebugger(siddhiDebugger);
    }
    start();
    return siddhiDebugger;
}
Also used : SiddhiDebugger(io.siddhi.core.debugger.SiddhiDebugger) OnDemandQueryRuntime(io.siddhi.core.query.OnDemandQueryRuntime) QueryRuntime(io.siddhi.core.query.QueryRuntime) SingleStreamRuntime(io.siddhi.core.query.input.stream.single.SingleStreamRuntime) ArrayList(java.util.ArrayList) StreamRuntime(io.siddhi.core.query.input.stream.StreamRuntime) SingleStreamRuntime(io.siddhi.core.query.input.stream.single.SingleStreamRuntime) OutputCallback(io.siddhi.core.query.output.callback.OutputCallback)

Aggregations

SiddhiDebugger (io.siddhi.core.debugger.SiddhiDebugger)1 OnDemandQueryRuntime (io.siddhi.core.query.OnDemandQueryRuntime)1 QueryRuntime (io.siddhi.core.query.QueryRuntime)1 StreamRuntime (io.siddhi.core.query.input.stream.StreamRuntime)1 SingleStreamRuntime (io.siddhi.core.query.input.stream.single.SingleStreamRuntime)1 OutputCallback (io.siddhi.core.query.output.callback.OutputCallback)1 ArrayList (java.util.ArrayList)1