Search in sources :

Example 1 with SiddhiDebugger

use of org.ballerinalang.siddhi.core.debugger.SiddhiDebugger in project ballerina by ballerina-lang.

the class SiddhiAppRuntime 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(queryRuntime.getStreamRuntime());
        streamCallbacks.add(queryRuntime.getOutputCallback());
    }
    for (StreamRuntime streamRuntime1 : streamRuntime) {
        for (SingleStreamRuntime singleStreamRuntime : streamRuntime1.getSingleStreamRuntimes()) {
            singleStreamRuntime.getProcessStreamReceiver().setSiddhiDebugger(siddhiDebugger);
        }
    }
    for (OutputCallback callback : streamCallbacks) {
        callback.setSiddhiDebugger(siddhiDebugger);
    }
    start();
    running = true;
    return siddhiDebugger;
}
Also used : SiddhiDebugger(org.ballerinalang.siddhi.core.debugger.SiddhiDebugger) StoreQueryRuntime(org.ballerinalang.siddhi.core.query.StoreQueryRuntime) QueryRuntime(org.ballerinalang.siddhi.core.query.QueryRuntime) SingleStreamRuntime(org.ballerinalang.siddhi.core.query.input.stream.single.SingleStreamRuntime) ArrayList(java.util.ArrayList) StreamRuntime(org.ballerinalang.siddhi.core.query.input.stream.StreamRuntime) SingleStreamRuntime(org.ballerinalang.siddhi.core.query.input.stream.single.SingleStreamRuntime) OutputCallback(org.ballerinalang.siddhi.core.query.output.callback.OutputCallback)

Aggregations

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