Class StreamProcessor<S extends State>

  • Type Parameters:
    S - current state of the processor
    All Implemented Interfaces:
    Processor, ExternalReferencedHolder
    Direct Known Subclasses:
    LogStreamProcessor

    public abstract class StreamProcessor<S extends State>
    extends AbstractStreamProcessor<S>
    For Siddhi extensions, extend this class to use the functionality of AbstractStreamProcessor. This class processes only StreamEvents. Use StreamFunctionProcessor to process StateEvents.
    • Constructor Detail

      • StreamProcessor

        public StreamProcessor()
    • Method Detail

      • processEventChunk

        protected void processEventChunk​(ComplexEventChunk<StreamEvent> streamEventChunk,
                                         Processor nextProcessor,
                                         StreamEventCloner streamEventCloner,
                                         ComplexEventPopulater complexEventPopulater,
                                         S state)
        Description copied from class: AbstractStreamProcessor
        The main processing method that will be called upon event arrival
        Specified by:
        processEventChunk in class AbstractStreamProcessor<S extends State>
        Parameters:
        streamEventChunk - the event chunk that need to be processed
        nextProcessor - the next processor to which the success events need to be passed
        streamEventCloner - helps to clone the incoming event for local storage or modification
        complexEventPopulater - helps to populate the events with the resultant attributes
        state - current state of the processor
      • process

        protected abstract void process​(ComplexEventChunk<StreamEvent> streamEventChunk,
                                        Processor nextProcessor,
                                        StreamEventCloner streamEventCloner,
                                        ComplexEventPopulater complexEventPopulater,
                                        S state)
        The main processing method that will be called upon event arrival
        Parameters:
        streamEventChunk - the event chunk that need to be processed
        nextProcessor - the next processor to which the success events need to be passed
        streamEventCloner - helps to clone the incoming event for local storage or modification
        complexEventPopulater - helps to populate the events with the resultant attributes
        state - current processor state