import com.google.common.base.Optional;
import com.google.common.collect.Maps;
+import com.google.common.eventbus.EventBus;
import com.google.common.primitives.Ints;
/**
*/
public class StreamSource implements Source {
+ /** The event bus. */
+ private final EventBus eventBus;
+
/** The URL of the stream. */
private final String streamUrl;
* the response header for vital information (sampling frequency, number of
* channels, etc.).
*
+ * @param eventBus
+ * The event bus
* @param streamUrl
* The URL of the stream
* @throws IOException
* if an I/O error occurs
*/
- public StreamSource(String streamUrl) throws IOException {
+ public StreamSource(EventBus eventBus, String streamUrl) throws IOException {
+ this.eventBus = eventBus;
this.streamUrl = streamUrl;
URL url = new URL(streamUrl);