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
/
sink
/
FileSink.java
diff --git
a/src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java
b/src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java
index
92dd59a
..
769ac65
100644
(file)
--- a/
src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java
+++ b/
src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java
@@
-27,6
+27,8
@@
import net.pterodactylus.sonitus.data.Controller;
import net.pterodactylus.sonitus.data.Metadata;
import net.pterodactylus.sonitus.data.Sink;
import net.pterodactylus.sonitus.data.Metadata;
import net.pterodactylus.sonitus.data.Sink;
+import com.google.common.eventbus.EventBus;
+
/**
* {@link net.pterodactylus.sonitus.data.Sink} that writes all received data
* into a file.
/**
* {@link net.pterodactylus.sonitus.data.Sink} that writes all received data
* into a file.
@@
-38,6
+40,9
@@
public class FileSink implements Sink {
/** The logger. */
private static final Logger logger = Logger.getLogger(FileSink.class.getName());
/** The logger. */
private static final Logger logger = Logger.getLogger(FileSink.class.getName());
+ /** The event bus. */
+ private final EventBus eventBus;
+
/** The path of the file to write to. */
private final String path;
/** The path of the file to write to. */
private final String path;
@@
-49,10
+54,13
@@
public class FileSink implements Sink {
/**
* Creates a new file sink that will write to the given path.
*
/**
* Creates a new file sink that will write to the given path.
*
+ * @param eventBus
+ * The event bus
* @param path
* The path of the file to write to
*/
* @param path
* The path of the file to write to
*/
- public FileSink(String path) {
+ public FileSink(EventBus eventBus, String path) {
+ this.eventBus = eventBus;
this.path = path;
}
this.path = path;
}