Class PassThroughSinkMapper
- java.lang.Object
-
- io.siddhi.core.stream.output.sink.SinkMapper
-
- io.siddhi.core.stream.output.sink.PassThroughSinkMapper
-
public class PassThroughSinkMapper extends SinkMapper
Implementation ofSinkMapperrepresenting pass-through scenario where no mapping is done andEvents are send directly to transports.
-
-
Field Summary
-
Fields inherited from class io.siddhi.core.stream.output.sink.SinkMapper
sinkOptionHolder, sinkType
-
-
Constructor Summary
Constructors Constructor Description PassThroughSinkMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]getOutputEventClasses()Get produced event class typesString[]getSupportedDynamicOptions()Supported dynamic options by the mappervoidinit(io.siddhi.query.api.definition.StreamDefinition streamDefinition, OptionHolder optionHolder, Map<String,TemplateBuilder> payloadTemplateBuilderMap, ConfigReader mapperConfigReader, SiddhiAppContext siddhiAppContext)Initialize the mapper and the mapping configurations.voidmapAndSend(Event[] events, OptionHolder optionHolder, Map<String,TemplateBuilder> payloadTemplateBuilderMap, SinkListener sinkListener)Called to map the events and send them toSinkListenerfor publishingvoidmapAndSend(Event event, OptionHolder optionHolder, Map<String,TemplateBuilder> payloadTemplateBuilderMap, SinkListener sinkListener)Called to map the event and send it toSinkListenerfor publishing-
Methods inherited from class io.siddhi.core.stream.output.sink.SinkMapper
buildMapperTemplate, getType, init, setGroupDeterminer
-
-
-
-
Method Detail
-
getSupportedDynamicOptions
public String[] getSupportedDynamicOptions()
Description copied from class:SinkMapperSupported dynamic options by the mapper- Specified by:
getSupportedDynamicOptionsin classSinkMapper- 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:SinkMapperInitialize the mapper and the mapping configurations.- Specified by:
initin classSinkMapper- Parameters:
streamDefinition- The stream definitionoptionHolder- Option holder containing static and dynamic options related to the mapperpayloadTemplateBuilderMap- Un mapped payloads for referencemapperConfigReader- System configuration reader for Sink-mapper.siddhiAppContext- Siddhi Application Context
-
getOutputEventClasses
public Class[] getOutputEventClasses()
Description copied from class:SinkMapperGet produced event class types- Specified by:
getOutputEventClassesin classSinkMapper- 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:SinkMapperCalled to map the events and send them toSinkListenerfor publishing- Specified by:
mapAndSendin classSinkMapper- Parameters:
events-Events that need to be mappedoptionHolder- Option holder containing static and dynamic options related to the mapperpayloadTemplateBuilderMap- To build the message payloads based on the given templatessinkListener-SinkListenerthat 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:SinkMapperCalled to map the event and send it toSinkListenerfor publishing- Specified by:
mapAndSendin classSinkMapper- Parameters:
event-Eventthat need to be mappedoptionHolder- Option holder containing static and dynamic options related to the mapperpayloadTemplateBuilderMap- To build the message payloads based on the given templatessinkListener-SinkListenerthat will be called with the mapped event
-
-