[vlma-devel] commit: No need for the watchers to be serializable. (Adrien Grand )

git version control git at videolan.org
Sun Oct 12 11:59:13 CEST 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Oct 12 11:58:24 2008 +0200| [29e9a6dc985185bfcd8581f7b26b36f1ce3bbc10] | committer: Adrien Grand 

No need for the watchers to be serializable.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=29e9a6dc985185bfcd8581f7b26b36f1ce3bbc10
---

 .../vlma/watcher/DirectMulticastStreamWatcher.java |   14 +-------------
 .../videolan/vlma/watcher/HttpStreamWatcher.java   |    5 +----
 .../vlma/watcher/StreamWatcherMockImpl.java        |    7 +------
 vlma-daemon/src/main/resources/daemon.xml          |    4 +---
 4 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/watcher/DirectMulticastStreamWatcher.java b/vlma-core/src/main/java/org/videolan/vlma/watcher/DirectMulticastStreamWatcher.java
index 5dc0fc5..315dd3e 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/watcher/DirectMulticastStreamWatcher.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/watcher/DirectMulticastStreamWatcher.java
@@ -22,11 +22,9 @@ package org.videolan.vlma.watcher;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
-import java.io.Serializable;
 import java.net.DatagramPacket;
 import java.net.MulticastSocket;
 
-import org.apache.commons.configuration.Configuration;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.videolan.vlma.model.Media;
@@ -40,14 +38,10 @@ import org.videolan.vlma.model.Program;
  *
  * @author Adrien Maglo <magsoft at videolan.org>
  */
-public class DirectMulticastStreamWatcher implements StreamWatcher, Serializable {
-
-    private static final long serialVersionUID = 6311983374515379831L;
+public class DirectMulticastStreamWatcher implements StreamWatcher {
 
     private static final Logger logger = Logger.getLogger(DirectMulticastStreamWatcher.class);
 
-    private Configuration configuration;
-
     /**
      * The thread used to wait.
      */
@@ -157,10 +151,4 @@ public class DirectMulticastStreamWatcher implements StreamWatcher, Serializable
         waitThread.start();
     }
 
-    /**
-     * @param configuration the configuration to set
-     */
-    public void setConfiguration(Configuration configuration) {
-        this.configuration = configuration;
-    }
 }
diff --git a/vlma-core/src/main/java/org/videolan/vlma/watcher/HttpStreamWatcher.java b/vlma-core/src/main/java/org/videolan/vlma/watcher/HttpStreamWatcher.java
index 8ae10ec..a12308e 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/watcher/HttpStreamWatcher.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/watcher/HttpStreamWatcher.java
@@ -21,7 +21,6 @@
 package org.videolan.vlma.watcher;
 
 import java.io.IOException;
-import java.io.Serializable;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
@@ -36,9 +35,7 @@ import org.videolan.vlma.model.Program;
  *
  * @author Adrien Grand <jpountz at videolan.org>
  */
-public class HttpStreamWatcher implements StreamWatcher, Serializable {
-
-    private static final long serialVersionUID = -7277103439483762155L;
+public class HttpStreamWatcher implements StreamWatcher {
 
     private Configuration configuration;
 
diff --git a/vlma-core/src/main/java/org/videolan/vlma/watcher/StreamWatcherMockImpl.java b/vlma-core/src/main/java/org/videolan/vlma/watcher/StreamWatcherMockImpl.java
index 9be6dd0..2a55771 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/watcher/StreamWatcherMockImpl.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/watcher/StreamWatcherMockImpl.java
@@ -20,8 +20,6 @@
 
 package org.videolan.vlma.watcher;
 
-import java.io.Serializable;
-
 import org.videolan.vlma.model.Media;
 
 /**
@@ -31,13 +29,10 @@ import org.videolan.vlma.model.Media;
  *
  * @author Adrien Grand <jpountz at videolan.org>
  */
-public class StreamWatcherMockImpl implements StreamWatcher, Serializable {
-
-    private static final long serialVersionUID = -7140427768396758460L;
+public class StreamWatcherMockImpl implements StreamWatcher {
 
     public boolean isPlayed(Media media) {
         return true;
     }
 
-
 }
diff --git a/vlma-daemon/src/main/resources/daemon.xml b/vlma-daemon/src/main/resources/daemon.xml
index ec2ae90..ec17ce2 100644
--- a/vlma-daemon/src/main/resources/daemon.xml
+++ b/vlma-daemon/src/main/resources/daemon.xml
@@ -171,9 +171,7 @@
         <property name="configuration" ref="configuration" />
     </bean>
 
-    <bean id="directMulticastStreamWatcher" class="org.videolan.vlma.watcher.DirectMulticastStreamWatcher">
-        <property name="configuration" ref="configuration" />
-    </bean>
+    <bean id="directMulticastStreamWatcher" class="org.videolan.vlma.watcher.DirectMulticastStreamWatcher" />
 
     <bean id="mockStreamWatcher" class="org.videolan.vlma.watcher.StreamWatcherMockImpl" />
 



More information about the vlma-devel mailing list