public Map<String, Object>[] toMap(Event[] events) {
        if (events != null) {
            Map[] mapEvents = new Map[events.length];
            for (int i = 0; i < events.length; i++) {
                mapEvents[i] = toMap(events[i]);
            }
            return mapEvents;
        }
        return null;
    }
StreamCallback is used to receive events from {@link StreamJunction}. This class should be extended if one intends
to get events from a Siddhi Stream.
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/StreamCallback.java