Search in sources :

Example 6 with StreamHandler

use of io.siddhi.query.api.execution.query.input.handler.StreamHandler in project siddhi by wso2.

the class SiddhiQLBaseVisitorImpl method visitBasic_source.

/**
 * {@inheritDoc}
 * <p>The default implementation returns the result of calling
 * {@link #visitChildren} on {@code ctx}.</p>
 *
 * @param ctx
 */
@Override
public BasicSingleInputStream visitBasic_source(@NotNull SiddhiQLParser.Basic_sourceContext ctx) {
    // basic_source
    // : io (basic_source_stream_handler)*
    // ;
    Source source = (Source) visit(ctx.source());
    BasicSingleInputStream basicSingleInputStream = new BasicSingleInputStream(null, source.streamId, source.isInnerStream, source.isFaultStream);
    if (ctx.basic_source_stream_handlers() != null) {
        basicSingleInputStream.addStreamHandlers((List<StreamHandler>) visit(ctx.basic_source_stream_handlers()));
    }
    populateQueryContext(basicSingleInputStream, ctx);
    return basicSingleInputStream;
}
Also used : BasicSingleInputStream(io.siddhi.query.api.execution.query.input.stream.BasicSingleInputStream) StreamHandler(io.siddhi.query.api.execution.query.input.handler.StreamHandler)

Aggregations

StreamHandler (io.siddhi.query.api.execution.query.input.handler.StreamHandler)6 SingleInputStream (io.siddhi.query.api.execution.query.input.stream.SingleInputStream)4 BasicSingleInputStream (io.siddhi.query.api.execution.query.input.stream.BasicSingleInputStream)3 ArrayList (java.util.ArrayList)3 MetaStateEvent (io.siddhi.core.event.state.MetaStateEvent)2 MetaStreamEvent (io.siddhi.core.event.stream.MetaStreamEvent)2 SingleStreamRuntime (io.siddhi.core.query.input.stream.single.SingleStreamRuntime)2 Processor (io.siddhi.core.query.processor.Processor)2 Query (io.siddhi.query.api.execution.query.Query)2 JoinInputStream (io.siddhi.query.api.execution.query.input.stream.JoinInputStream)2 List (java.util.List)2 AggregationRuntime (io.siddhi.core.aggregation.AggregationRuntime)1 SiddhiAppContext (io.siddhi.core.config.SiddhiAppContext)1 SiddhiQueryContext (io.siddhi.core.config.SiddhiQueryContext)1 StateEventPopulatorFactory (io.siddhi.core.event.state.populater.StateEventPopulatorFactory)1 EventType (io.siddhi.core.event.stream.MetaStreamEvent.EventType)1 OperationNotSupportedException (io.siddhi.core.exception.OperationNotSupportedException)1 SiddhiAppCreationException (io.siddhi.core.exception.SiddhiAppCreationException)1 VariableExpressionExecutor (io.siddhi.core.executor.VariableExpressionExecutor)1 QueryRuntime (io.siddhi.core.query.QueryRuntime)1