public InputHandler getInputHandler(String streamId) {
        InputHandler inputHandler = inputHandlerMap.get(streamId);
        if (inputHandler == null) {
            synchronized (this) {
                inputHandler = inputHandlerMap.get(streamId);
                if (inputHandler == null) {
                    InputHandler newInputHandler = constructInputHandler(streamId);
                    if (this.isConnected) {
                        newInputHandler.connect();
                    }
                    return newInputHandler;
                } else {
                    return inputHandler;
                }
            }
        } else {
            return inputHandler;
        }
    }
Manager class to handle {@link Event} insertion to Siddhi.
modules/siddhi-core/src/main/java/io/siddhi/core/stream/input/InputManager.java