summaryrefslogtreecommitdiff
path: root/src/mining/Stream.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/mining/Stream.java')
-rw-r--r--src/mining/Stream.java27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/mining/Stream.java b/src/mining/Stream.java
index c9c08f0..283b4ea 100644
--- a/src/mining/Stream.java
+++ b/src/mining/Stream.java
@@ -1,9 +1,28 @@
-
package mining;
/**
- * This miner obtains data by receiving a stream from twitter.
+ * interface for all streaming classes.
+ *
+ * @author Maurice Laveaux
*/
-public class Stream {
-
+public interface Stream {
+
+ /**
+ * Open the connection to the server.
+ */
+ public void open();
+
+ /**
+ * Set a single listener for this stream.
+ *
+ * @param listener The object that is listening.
+ */
+ public void setListener(StreamListener listener);
+
+ /**
+ * Test whether the stream is ready for streaming
+ *
+ * @return true if connection can be made, false otherwise.
+ */
+ public boolean isValid();
}