Class PassThroughSourceMapper
- java.lang.Object
-
- io.siddhi.core.stream.input.source.SourceMapper
-
- io.siddhi.core.stream.input.source.PassThroughSourceMapper
-
- All Implemented Interfaces:
SourceEventListener
public class PassThroughSourceMapper extends SourceMapper
Event Mapper implementation to handle pass-through scenario where user does not need to do any mapping.
-
-
Field Summary
-
Fields inherited from class io.siddhi.core.stream.input.source.SourceMapper
sourceOptionHolder, sourceType
-
-
Constructor Summary
Constructors Constructor Description PassThroughSourceMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanallowNullInTransportProperties()Method used bySourceMapperto determine on how to handle transport properties with null values.Class[]getSupportedInputEventClasses()Support classes that the source-mapper can consume for mapping processing (used for validation purposes)voidinit(io.siddhi.query.api.definition.StreamDefinition streamDefinition, OptionHolder optionHolder, List<AttributeMapping> attributeMappingList, ConfigReader configReader, SiddhiAppContext siddhiAppContext)Initialize Source-mapperprotected voidmapAndProcess(Object eventObject, InputEventHandler inputEventHandler)Method to map the incoming event and as pass that via inputEventHandler to process further.-
Methods inherited from class io.siddhi.core.stream.input.source.SourceMapper
getEventCount, getHandler, getStreamDefinition, init, onEvent, onEvent, onEvent, onEvent, setInputHandler
-
-
-
-
Method Detail
-
init
public void init(io.siddhi.query.api.definition.StreamDefinition streamDefinition, OptionHolder optionHolder, List<AttributeMapping> attributeMappingList, ConfigReader configReader, SiddhiAppContext siddhiAppContext)Description copied from class:SourceMapperInitialize Source-mapper- Specified by:
initin classSourceMapper- Parameters:
streamDefinition- Associated output stream definitionoptionHolder- Mapper option holderattributeMappingList- Custom attribute mapping for source-mappingconfigReader- System configuration readersiddhiAppContext- Siddhi application context
-
getSupportedInputEventClasses
public Class[] getSupportedInputEventClasses()
Description copied from class:SourceMapperSupport classes that the source-mapper can consume for mapping processing (used for validation purposes)- Specified by:
getSupportedInputEventClassesin classSourceMapper- Returns:
- Supported event classes that mapper can process.
-
mapAndProcess
protected void mapAndProcess(Object eventObject, InputEventHandler inputEventHandler) throws MappingFailedException, InterruptedException
Description copied from class:SourceMapperMethod to map the incoming event and as pass that via inputEventHandler to process further.- Specified by:
mapAndProcessin classSourceMapper- Parameters:
eventObject- Incoming event ObjectinputEventHandler- Handler to pass the converted Siddhi Event for processing- Throws:
MappingFailedException- Throws MappingFailedExceptionInterruptedException- Throws InterruptedException
-
allowNullInTransportProperties
protected boolean allowNullInTransportProperties()
Description copied from class:SourceMapperMethod used bySourceMapperto determine on how to handle transport properties with null values. If this returns 'false' thenSourceMapperwill drop any event/s with null transport property values. If this returns 'true' thenSourceMapperwill send events even though they contains null transport properties. This method will be called after init().- Specified by:
allowNullInTransportPropertiesin classSourceMapper- Returns:
- whether
SourceMappershould allow or drop events when transport properties are null.
-
-