@Override
            public void onMessage(Object event) {
                if (paused) {
                    pauseLock.lock();
                    try {
                        while (paused) {
                            unpaused.await();
                        }
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                    } finally {
                        pauseLock.unlock();
                    }
                }
                sourceEventListener.onEvent(event, null);
            }
Implementation of {@link Source} to receive events through in-memory transport.
modules/siddhi-core/src/main/java/io/siddhi/core/stream/input/source/InMemorySource.java