projects
/
sonitus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Create all controlled components with an event bus.
[sonitus.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sonitus
/
data
/
source
/
StreamSource.java
diff --git
a/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java
b/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java
index
9a624e0
..
a116d80
100644
(file)
--- a/
src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java
+++ b/
src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java
@@
-35,6
+35,7
@@
import net.pterodactylus.sonitus.io.MetadataStream;
import com.google.common.base.Optional;
import com.google.common.collect.Maps;
import com.google.common.base.Optional;
import com.google.common.collect.Maps;
+import com.google.common.eventbus.EventBus;
import com.google.common.primitives.Ints;
/**
import com.google.common.primitives.Ints;
/**
@@
-47,6
+48,9
@@
import com.google.common.primitives.Ints;
*/
public class StreamSource implements Source {
*/
public class StreamSource implements Source {
+ /** The event bus. */
+ private final EventBus eventBus;
+
/** The URL of the stream. */
private final String streamUrl;
/** The URL of the stream. */
private final String streamUrl;
@@
-64,12
+68,15
@@
public class StreamSource implements Source {
* the response header for vital information (sampling frequency, number of
* channels, etc.).
*
* 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
*/
* @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);
this.streamUrl = streamUrl;
URL url = new URL(streamUrl);