public abstract class SourceMapper extends Object implements SourceEventListener
Source
to ComplexEventChunk
.Constructor and Description |
---|
SourceMapper() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
allowNullInTransportProperties()
Method used by
SourceMapper to determine on how to handle transport properties with null values. |
SourceHandler |
getHandler() |
io.siddhi.query.api.definition.StreamDefinition |
getStreamDefinition() |
abstract Class[] |
getSupportedInputEventClasses()
Support classes that the source-mapper can consume for mapping processing (used for validation purposes)
|
abstract void |
init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
OptionHolder optionHolder,
List<AttributeMapping> attributeMappingList,
ConfigReader configReader,
SiddhiAppContext siddhiAppContext)
Initialize Source-mapper
|
void |
init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
String mapType,
OptionHolder mapOptionHolder,
List<AttributeMapping> attributeMappings,
String sourceType,
SourceSyncCallback sourceSyncCallback,
List<AttributeMapping> transportMappings,
SourceHandler sourceHandler,
ConfigReader configReader,
SiddhiAppContext siddhiAppContext) |
protected abstract void |
mapAndProcess(Object eventObject,
InputEventHandler inputEventHandler)
Method to map the incoming event and as pass that via inputEventHandler to process further.
|
void |
onEvent(Object eventObject,
String[] transportProperties) |
void |
onEvent(Object eventObject,
String[] transportProperties,
String[] transportSyncProperties) |
void |
setInputHandler(InputHandler inputHandler) |
public final void init(io.siddhi.query.api.definition.StreamDefinition streamDefinition, String mapType, OptionHolder mapOptionHolder, List<AttributeMapping> attributeMappings, String sourceType, SourceSyncCallback sourceSyncCallback, List<AttributeMapping> transportMappings, SourceHandler sourceHandler, ConfigReader configReader, SiddhiAppContext siddhiAppContext)
public abstract void init(io.siddhi.query.api.definition.StreamDefinition streamDefinition, OptionHolder optionHolder, List<AttributeMapping> attributeMappingList, ConfigReader configReader, SiddhiAppContext siddhiAppContext)
streamDefinition
- Associated output stream definitionoptionHolder
- Mapper option holderattributeMappingList
- Custom attribute mapping for source-mappingconfigReader
- System configuration readersiddhiAppContext
- Siddhi application contextpublic abstract Class[] getSupportedInputEventClasses()
public final void setInputHandler(InputHandler inputHandler)
public final void onEvent(Object eventObject, String[] transportProperties)
onEvent
in interface SourceEventListener
public final void onEvent(Object eventObject, String[] transportProperties, String[] transportSyncProperties)
onEvent
in interface SourceEventListener
public SourceHandler getHandler()
public final io.siddhi.query.api.definition.StreamDefinition getStreamDefinition()
getStreamDefinition
in interface SourceEventListener
protected abstract void mapAndProcess(Object eventObject, InputEventHandler inputEventHandler) throws InterruptedException
eventObject
- Incoming event ObjectinputEventHandler
- Handler to pass the converted Siddhi Event for processingInterruptedException
- Throws InterruptedExceptionprotected abstract boolean allowNullInTransportProperties()
SourceMapper
to determine on how to handle transport properties with null values. If
this returns 'false' then SourceMapper
will drop any event/s with null transport
property values. If this returns
'true' then SourceMapper
will send events even though they contains null transport properties.
This method will be called after init().SourceMapper
should allow or drop events when transport properties are null.Copyright © 2019. All rights reserved.