public final void init(String sourceType, OptionHolder transportOptionHolder, SourceMapper sourceMapper,
                           String[] transportPropertyNames, ConfigReader configReader, String mapType,
                           OptionHolder mapOptionHolder, List<AttributeMapping> attributeMappings,
                           List<AttributeMapping> transportMappings, ConfigReader mapperConfigReader,
                           SourceHandler sourceHandler, StreamDefinition streamDefinition,
                           Map<String, String> deploymentProperties, SiddhiAppContext siddhiAppContext) {
        this.type = sourceType;

        sourceMapper.init(streamDefinition, mapType, mapOptionHolder, attributeMappings, sourceType,
                (this instanceof SourceSyncCallback) ? (SourceSyncCallback) this : null, transportMappings,
                sourceHandler, transportOptionHolder, mapperConfigReader, siddhiAppContext);
        this.mapper = sourceMapper;
        this.streamDefinition = streamDefinition;
        this.siddhiAppContext = siddhiAppContext;
        StateFactory<S> stateFactory = init(sourceMapper, transportOptionHolder, transportPropertyNames,
                configReader, siddhiAppContext);
        stateHolder = siddhiAppContext.generateStateHolder(streamDefinition.getId() + "-" +
                this.getClass().getName(), stateFactory);
        scheduledExecutorService = siddhiAppContext.getScheduledExecutorService();
        serviceDeploymentInfo = exposeServiceDeploymentInfo();
        if (serviceDeploymentInfo != null) {
            serviceDeploymentInfo.addDeploymentProperties(deploymentProperties);
        } else if (!deploymentProperties.isEmpty()) {
            throw new SiddhiAppCreationException("Deployment properties '" + deploymentProperties +
                    "' are defined for source '" + sourceType + "' which does not expose a service");
        }
    }
Abstract class to represent Event Sources. Events Sources are the object entry point to Siddhi from external
transports. Each source represent a transport type. Whenever Siddhi need to support a new transport, a new Event
source should be implemented.

@param <S> current state of the Source
modules/siddhi-core/src/main/java/io/siddhi/core/stream/input/source/Source.java