public final void init(StreamDefinition streamDefinition, String mapType, OptionHolder mapOptionHolder,
                           List<AttributeMapping> attributeMappings, String sourceType,
                           SourceSyncCallback sourceSyncCallback, List<AttributeMapping> transportMappings,
                           SourceHandler sourceHandler, OptionHolder sourceOptionHolder, ConfigReader configReader,
                           SiddhiAppContext siddhiAppContext) {

        this.streamDefinition = streamDefinition;
        this.mapType = mapType;
        this.sourceType = sourceType;
        this.transportMappings = transportMappings;
        this.sourceOptionHolder = sourceOptionHolder;
        if (sourceHandler != null) {
            sourceHandler.initSourceHandler(siddhiAppContext.getName(), sourceSyncCallback, streamDefinition,
                    siddhiAppContext);
        }
        this.sourceHandler = sourceHandler;
        this.siddhiAppContext = siddhiAppContext;
        if (siddhiAppContext.getStatisticsManager() != null) {
            this.throughputTracker = QueryParserHelper.createThroughputTracker(siddhiAppContext,
                    streamDefinition.getId(),
                    SiddhiConstants.METRIC_INFIX_SOURCES, sourceType);
            this.mapperLatencyTracker = QueryParserHelper.createLatencyTracker(siddhiAppContext,
                    streamDefinition.getId(),
                    SiddhiConstants.METRIC_INFIX_SOURCE_MAPPERS,
                    sourceType + SiddhiConstants.METRIC_DELIMITER + mapType);
        }
        if (configReader != null && configReader.getAllConfigs().size() != 0) {
            if (configReader.getAllConfigs().containsKey(ENABLE_EVENT_COUNT_LOGGER) &&
                    configReader.getAllConfigs().get(ENABLE_EVENT_COUNT_LOGGER).toLowerCase().equals(TRUE)) {
                logEventCount = true;
                this.receivedEventCounter = new ReceivedEventCounter();
                if (configReader.getAllConfigs().containsKey(LOGGING_DURATION)) {
                    loggingDuration = Integer.parseInt(configReader.getAllConfigs().get(LOGGING_DURATION));
                }
                receivedEventCounter.init(siddhiAppContext, streamDefinition, loggingDuration);
            }
        }
        init(streamDefinition, mapOptionHolder, attributeMappings, configReader, siddhiAppContext);
    }
Convert custom input from {@link Source} to {@link ComplexEventChunk}.
modules/siddhi-core/src/main/java/io/siddhi/core/stream/input/source/SourceMapper.java