From: David ‘Bombe’ Roden Date: Sat, 16 Mar 2013 18:52:52 +0000 (+0100) Subject: Add method to notify sink when a source has updated its metadata. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7c0955003c1eb215da5f763e986e99e68206a086;p=sonitus.git Add method to notify sink when a source has updated its metadata. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/Sink.java b/src/main/java/net/pterodactylus/sonitus/data/Sink.java index 5ca6a79..7f6ce6b 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Sink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Sink.java @@ -36,4 +36,7 @@ public interface Sink { */ void connect(Source source) throws ConnectException; + /** Notifies the sink that a source has updated its metadata. */ + void metadataUpdated(); + } diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalFilter.java index 3bfb774..3452c76 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalFilter.java @@ -130,6 +130,11 @@ public abstract class ExternalFilter implements Filter { } } + @Override + public void metadataUpdated() { + /* ignore. */ + } + // // SUBCLASS METHODS // diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/MultiSourceFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/MultiSourceFilter.java index 33424ac..a505c92 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/MultiSourceFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/MultiSourceFilter.java @@ -108,6 +108,11 @@ public class MultiSourceFilter implements Filter, ReusableSink { } } + @Override + public void metadataUpdated() { + /* ignore. */ + } + /** * The connection feeds the input from the currently connected source to the * input stream that {@link #get(int)} will get its data from. diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/RateLimitingFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/RateLimitingFilter.java index a573295..66ca8a7 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/RateLimitingFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/RateLimitingFilter.java @@ -133,4 +133,9 @@ public class RateLimitingFilter implements Filter { } } + @Override + public void metadataUpdated() { + /* ignore. */ + } + } diff --git a/src/main/java/net/pterodactylus/sonitus/data/sink/AudioSink.java b/src/main/java/net/pterodactylus/sonitus/data/sink/AudioSink.java index 1e4f6ec..520be04 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/sink/AudioSink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/sink/AudioSink.java @@ -76,4 +76,9 @@ public class AudioSink implements Sink { } } + @Override + public void metadataUpdated() { + /* ignore. */ + } + } 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 015dd6f..61e0a27 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java @@ -81,4 +81,9 @@ public class FileSink implements Sink { } } + @Override + public void metadataUpdated() { + /* ignore. */ + } + } diff --git a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java index 30801c6..7423588 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java @@ -157,6 +157,10 @@ public class Icecast2Sink implements Sink { } } + @Override + public void metadataUpdated() { + } + // // PRIVATE METHODS //