[Red5commits] [1630] ServerStream? now implements getCurrentItem from interface

mklishin luke at codegent.com
Wed Jan 24 11:10:09 EST 2007


ServerStream? now implements getCurrentItem from interface


Timestamp: 01/18/07 05:35:26 EST (6 days ago) 
Change: 1630 
Author: mklishin

Files (see diff or trac for details): 
java/server/trunk/src/org/red5/server/Standalone.java
java/server/trunk/src/org/red5/server/adapter/ApplicationAdapter.java
java/server/trunk/src/org/red5/server/api/service/IServiceCapableConnection.java
java/server/trunk/src/org/red5/server/api/service/IServiceInvoker.java
java/server/trunk/src/org/red5/server/so/SharedObjectScope.java
java/server/trunk/src/org/red5/server/stream/ServerStream.java


Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/1630

Index: /java/server/trunk/src/org/red5/server/adapter/ApplicationAdapter.java
===================================================================
--- /java/server/trunk/src/org/red5/server/adapter/ApplicationAdapter.java (revision 1629)
+++ /java/server/trunk/src/org/red5/server/adapter/ApplicationAdapter.java (revision 1630)
@@ -72,5 +72,7 @@
  * nc.call("getLiveStreams", resultHandlerObj);<br />
  * </code>
+ *
  * 
+ *
  * <p>If you want to build a server-side framework this is a place to start and wrap it around ApplicationAdapter subclass.</p>
  * </p>
Index: /java/server/trunk/src/org/red5/server/so/SharedObjectScope.java
===================================================================
--- /java/server/trunk/src/org/red5/server/so/SharedObjectScope.java (revision 1609)
+++ /java/server/trunk/src/org/red5/server/so/SharedObjectScope.java (revision 1630)
@@ -91,13 +91,4 @@
 			so.setPath(parent.getContextPath());
 		}
-	}
-
-	/**
-     * Setter for persistence class.
-     *
-     * @param persistenceClass  Persistence class.
-     */
-    public void setPersistenceClass(String persistenceClass) {
-		// Nothing to do here, the shared object will take care of persistence.
 	}
 
Index: /java/server/trunk/src/org/red5/server/stream/ServerStream.java
===================================================================
--- /java/server/trunk/src/org/red5/server/stream/ServerStream.java (revision 1606)
+++ /java/server/trunk/src/org/red5/server/stream/ServerStream.java (revision 1630)
@@ -20,11 +20,4 @@
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -33,24 +26,7 @@
 import org.red5.server.api.scheduling.IScheduledJob;
 import org.red5.server.api.scheduling.ISchedulingService;
-import org.red5.server.api.stream.IPlayItem;
-import org.red5.server.api.stream.IPlaylistController;
-import org.red5.server.api.stream.IServerStream;
-import org.red5.server.api.stream.IStreamFilenameGenerator;
-import org.red5.server.api.stream.ResourceExistException;
-import org.red5.server.api.stream.ResourceNotFoundException;
+import org.red5.server.api.stream.*;
 import org.red5.server.api.stream.IStreamFilenameGenerator.GenerationType;
-import org.red5.server.messaging.IFilter;
-import org.red5.server.messaging.IMessage;
-import org.red5.server.messaging.IMessageComponent;
-import org.red5.server.messaging.IMessageInput;
-import org.red5.server.messaging.IMessageOutput;
-import org.red5.server.messaging.IPassive;
-import org.red5.server.messaging.IPipe;
-import org.red5.server.messaging.IPipeConnectionListener;
-import org.red5.server.messaging.IProvider;
-import org.red5.server.messaging.IPushableConsumer;
-import org.red5.server.messaging.InMemoryPushPushPipe;
-import org.red5.server.messaging.OOBControlMessage;
-import org.red5.server.messaging.PipeConnectionEvent;
+import org.red5.server.messaging.*;
 import org.red5.server.net.rtmp.event.AudioData;
 import org.red5.server.net.rtmp.event.IRTMPEvent;
@@ -60,4 +36,11 @@
 import org.red5.server.stream.message.ResetMessage;
 import org.springframework.core.io.Resource;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
@@ -214,5 +197,10 @@
 	}
 
-	/** {@inheritDoc} */
+    /** {@inheritDoc} */
+    public IPlayItem getCurrentItem() {
+        return currentItem;
+    }
+
+    /** {@inheritDoc} */
     public IPlayItem getItem(int index) {
 		try {
Index: /java/server/trunk/src/org/red5/server/Standalone.java
===================================================================
--- /java/server/trunk/src/org/red5/server/Standalone.java (revision 1606)
+++ /java/server/trunk/src/org/red5/server/Standalone.java (revision 1630)
@@ -53,7 +53,7 @@
 
     /**
-     *
-     * @param e
-     * @throws Throwable
+     * Re-throws exception
+     * @param e               Exception
+     * @throws Throwable      Re-thrown exception
      */
 	public static void raiseOriginalException(Throwable e) throws Throwable {
@@ -126,12 +126,12 @@
 		props.load(new FileInputStream(root + "/red5.properties"));
 		Iterator it = props.keySet().iterator();
-		while (it.hasNext()) {
-			String key = (String) it.next();
-			if (key != null && !key.equals("")) {
-				System.setProperty(key, props.getProperty(key));
-			}
-		}
+        for (Object o : props.keySet()) {
+            String key = (String) o;
+            if (key != null && !key.equals("")) {
+                System.setProperty(key, props.getProperty(key));
+            }
+        }
 
-		// Store root directory of Red5
+        // Store root directory of Red5
 		idx = root.lastIndexOf('/');
 		root = root.substring(0, idx);
Index: /java/server/trunk/src/org/red5/server/api/service/IServiceCapableConnection.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/service/IServiceCapableConnection.java (revision 1406)
+++ /java/server/trunk/src/org/red5/server/api/service/IServiceCapableConnection.java (revision 1630)
@@ -22,27 +22,76 @@
 import org.red5.server.api.IConnection;
 
+/**
+ * Connection that has options to invoke and handle remote calls
+ */
 // TODO: this should really extend IServiceInvoker
 public interface IServiceCapableConnection extends IConnection {
+    /**
+     * Invokes service using remoting call object
+     * @param call       Service call object
+     */
+    void invoke(IServiceCall call);
 
-	public void invoke(IServiceCall call);
+    /**
+     * Invoke service using call and channel
+     * @param call       Service call
+     * @param channel    Channel used
+     */
+    void invoke(IServiceCall call, byte channel);
 
-	public void invoke(IServiceCall call, byte channel);
+    /**
+     * Invoke method by name
+     * @param method     Called method name
+     */
+    void invoke(String method);
 
-	public void invoke(String method);
+    /**
+     * Invoke method by name with callback
+     * @param method     Called method name
+     * @param callback   Callback
+     */
+    void invoke(String method, IPendingServiceCallback callback);
 
-	public void invoke(String method, IPendingServiceCallback callback);
+    /**
+     * Invoke method with parameters
+     * @param method     Method name
+     * @param params     Invocation parameters passed to method
+     */
+    void invoke(String method, Object[] params);
 
-	public void invoke(String method, Object[] params);
-
-	public void invoke(String method, Object[] params,
+    /**
+     *
+     * @param method
+     * @param params
+     * @param callback
+     */
+    void invoke(String method, Object[] params,
 			IPendingServiceCallback callback);
 
-	public void notify(IServiceCall call);
+    /**
+     *
+     * @param call
+     */
+    void notify(IServiceCall call);
 
-	public void notify(IServiceCall call, byte channel);
+    /**
+     *
+     * @param call
+     * @param channel
+     */
+    void notify(IServiceCall call, byte channel);
 
-	public void notify(String method);
+    /**
+     *
+     * @param method
+     */
+    void notify(String method);
 
-	public void notify(String method, Object[] params);
+    /**
+     * 
+     * @param method
+     * @param params
+     */
+    void notify(String method, Object[] params);
 
 }
Index: /java/server/trunk/src/org/red5/server/api/service/IServiceInvoker.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/service/IServiceInvoker.java (revision 1406)
+++ /java/server/trunk/src/org/red5/server/api/service/IServiceInvoker.java (revision 1630)
@@ -23,5 +23,5 @@
 
 /**
- * Interface for objects that execute service calls.
+ * Interface for objects that execute service calls (remote calls from client).
  * 
  * @author The Red5 Project (red5 at osflash.org)
@@ -39,5 +39,5 @@
 	 * 			the scope to search for a handler
 	 */
-	public void invoke(IServiceCall call, IScope scope);
+    void invoke(IServiceCall call, IScope scope);
 
 	/**
@@ -49,5 +49,5 @@
 	 * 			the service to use
 	 */
-	public void invoke(IServiceCall call, Object service);
+    void invoke(IServiceCall call, Object service);
 
 }


Note:
Diffs are chopped if more than 25k.
This is to get past the limit on the mailing list.



More information about the Red5commits mailing list