+public interface TerminalReader {
+
+ /**
+ * Check if there are events in the queue.
+ *
+ * @return if true, getEvents() has something to return to the backend
+ */
+ public boolean hasEvents();
+
+ /**
+ * Classes must provide an implementation to get keyboard, mouse, and
+ * screen resize events.
+ *
+ * @param queue list to append new events to
+ */
+ public void getEvents(List<TInputEvent> queue);
+
+ /**
+ * Classes must provide an implementation that closes sockets, restores
+ * console, etc.
+ */
+ public void closeTerminal();
+
+}