public void setToLast(Processor processor) {
        if (nextProcessor == null) {
            this.nextProcessor = processor;
        } else {
            this.nextProcessor.setToLast(processor);
        }
    }
The main processing method that will be called upon event arrival

@param streamEventChunk      the event chunk that need to be processed
@param nextProcessor         the next processor to which the success events need to be passed
@param streamEventCloner     helps to clone the incoming event for local storage or modification
@param complexEventPopulater helps to populate the events with the resultant attributes
@param state                 current state of the processor
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/AbstractStreamProcessor.java