diff options
Diffstat (limited to 'src/main/TweetShell.java')
-rw-r--r-- | src/main/TweetShell.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/TweetShell.java b/src/main/TweetShell.java index 12814b0..3ab1397 100644 --- a/src/main/TweetShell.java +++ b/src/main/TweetShell.java @@ -168,6 +168,7 @@ public class TweetShell implements TwitterApi.PinSupplier { del("Deletes a keyword from search", 1), keywords("Display currently active keywords"), commit("Activate the stream or apply the stream keyword changes"), + status("Show some status and statistics"), close("Close the stream"), exit("Returns to shell"), help("Get help"), @@ -253,6 +254,16 @@ public class TweetShell implements TwitterApi.PinSupplier { case commit: getStream().commit(); break; + case status: + TweetCounter tc; + tc = (TweetCounter) resultListeners.findListener(TweetCounter.class); + if (stream_cached != null && getStream().isValid()) { + System.out.println("Streaming is active."); + } else { + System.out.println("Streaming is inactive."); + } + System.out.println("Received tweets in session: " + tc.getTweetCount()); + break; case close: getStream().close(); break; |