Class PassThroughSinkMapper


  • public class PassThroughSinkMapper
    extends SinkMapper
    Implementation of SinkMapper representing pass-through scenario where no mapping is done and Events are send directly to transports.
    • Constructor Detail

      • PassThroughSinkMapper

        public PassThroughSinkMapper()
    • Method Detail

      • getSupportedDynamicOptions

        public String[] getSupportedDynamicOptions()
        Description copied from class: SinkMapper
        Supported dynamic options by the mapper
        Specified by:
        getSupportedDynamicOptions in class SinkMapper
        Returns:
        the list of supported dynamic option keys
      • init

        public void init​(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
                         OptionHolder optionHolder,
                         Map<String,​TemplateBuilder> payloadTemplateBuilderMap,
                         ConfigReader mapperConfigReader,
                         SiddhiAppContext siddhiAppContext)
        Description copied from class: SinkMapper
        Initialize the mapper and the mapping configurations.
        Specified by:
        init in class SinkMapper
        Parameters:
        streamDefinition - The stream definition
        optionHolder - Option holder containing static and dynamic options related to the mapper
        payloadTemplateBuilderMap - Un mapped payloads for reference
        mapperConfigReader - System configuration reader for Sink-mapper.
        siddhiAppContext - Siddhi Application Context
      • getOutputEventClasses

        public Class[] getOutputEventClasses()
        Description copied from class: SinkMapper
        Get produced event class types
        Specified by:
        getOutputEventClasses in class SinkMapper
        Returns:
        Array of classes that will be produced by the sink-mapper, null or empty array if it can produce any type of class.
      • mapAndSend

        public void mapAndSend​(Event[] events,
                               OptionHolder optionHolder,
                               Map<String,​TemplateBuilder> payloadTemplateBuilderMap,
                               SinkListener sinkListener)
        Description copied from class: SinkMapper
        Called to map the events and send them to SinkListener for publishing
        Specified by:
        mapAndSend in class SinkMapper
        Parameters:
        events - Events that need to be mapped
        optionHolder - Option holder containing static and dynamic options related to the mapper
        payloadTemplateBuilderMap - To build the message payloads based on the given templates
        sinkListener - SinkListener that will be called with the mapped events
      • mapAndSend

        public void mapAndSend​(Event event,
                               OptionHolder optionHolder,
                               Map<String,​TemplateBuilder> payloadTemplateBuilderMap,
                               SinkListener sinkListener)
        Description copied from class: SinkMapper
        Called to map the event and send it to SinkListener for publishing
        Specified by:
        mapAndSend in class SinkMapper
        Parameters:
        event - Event that need to be mapped
        optionHolder - Option holder containing static and dynamic options related to the mapper
        payloadTemplateBuilderMap - To build the message payloads based on the given templates
        sinkListener - SinkListener that will be called with the mapped event