[Red5commits] [1937] added "clean" shutdown of red5 via JMX with tomcat and jetty
pgregoire
luke at codegent.com
Fri Apr 27 19:10:30 EDT 2007
added "clean" shutdown of red5 via JMX with tomcat and jetty
Timestamp: 04/27/07 18:05:39 EST (less than one hour ago)
Change: 1937
Author: pgregoire
Files (see diff or trac for details):
java/server/branches/paul_jmx/.classpath
java/server/branches/paul_jmx/conf/log4j.properties
java/server/branches/paul_jmx/src/org/red5/io/utils/ByteBufferUtil.java
java/server/branches/paul_jmx/src/org/red5/server/JettyLoader.java
java/server/branches/paul_jmx/src/org/red5/server/LoaderMBean.java
java/server/branches/paul_jmx/src/org/red5/server/TomcatLoader.java
java/server/branches/paul_jmx/src/org/red5/server/adapter/ApplicationAdapter.java
java/server/branches/paul_jmx/src/org/red5/server/adapter/IApplication.java
java/server/branches/paul_jmx/src/org/red5/server/api/stream/support/StreamUtils.java
java/server/branches/paul_jmx/src/org/red5/server/messaging/AbstractPipe.java
java/server/branches/paul_jmx/src/org/red5/server/messaging/InMemoryPushPushPipe.java
java/server/branches/paul_jmx/src/org/red5/server/stream/ProviderService.java
java/server/branches/paul_jmx/src/org/red5/server/stream/ServerStream.java
java/server/branches/paul_jmx/webapps/recorder
java/server/branches/paul_jmx/webapps/recorder/WEB-INF
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/log4j.properties
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.properties
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.xml
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/Application.java
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/StreamManager.java
java/server/branches/paul_jmx/webapps/recorder/WEB-INF/web.xml
java/server/branches/paul_jmx/webapps/root/bc.html
java/server/branches/paul_jmx/webapps/root/broadcast.swf
java/server/branches/paul_jmx/webapps/root/view.swf
Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/1937
Index: /java/server/branches/paul_jmx/.classpath
===================================================================
--- /java/server/branches/paul_jmx/.classpath (revision 1927)
+++ /java/server/branches/paul_jmx/.classpath (revision 1937)
@@ -2,4 +2,5 @@
<classpath>
<classpathentry excluding=".svn/*" kind="src" path="src"/>
+ <classpathentry kind="src" path="webapps/recorder/WEB-INF/src"/>
<classpathentry excluding=".svn/*" kind="src" path="webapps/echo/WEB-INF/src"/>
<classpathentry excluding=".svn/*" kind="src" path="webapps/oflaDemo/WEB-INF/src"/>
Index: /java/server/branches/paul_jmx/webapps/root/bc.html
===================================================================
--- /java/server/branches/paul_jmx/webapps/root/bc.html (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/root/bc.html (revision 1937)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>FLV demos</title>
+<script type="text/javascript" src="swfobject.js"></script>
+<style type="text/css">
+
+ body {
+ background-color: #eeeeee;
+ font: .8em/1.3em verdana,arial,helvetica,sans-serif;
+ }
+
+ #info {
+ width: 300px;
+ overflow: auto;
+ }
+
+ #flashcontent {
+ border: solid 1px #000;
+ width: 640px;
+ height: 480px;
+ float: left;
+ margin: 15px 20px;
+ }
+
+</style>
+</head>
+<body>
+
+ <div id="flashcontent">
+ <strong>You need to upgrade your Flash Player</strong>
+ This is replaced by the Flash content.
+ Place your alternate content here and users without the Flash plugin or with
+ Javascript turned off will see this. Content here allows you to leave out <code>noscript</code>
+ tags. Include a link to <a href="flvdemo.html?detectflash=false">bypass the detection</a> if you wish.
+ </div>
+
+ <div id="info">
+ <p id="flashversion">
+ You do not have the Flash plugin installed, or your browser does not support Javascript (you should enable it, perhaps?)
+ </p>
+ </div>
+
+ <script type="text/javascript">
+ // <![CDATA[
+
+ var so = new SWFObject("broadcast.swf", "ofla", "640", "480", "8");
+ so.addVariable("flashVarText", "this is passed in via FlashVars for example only");
+ so.write("flashcontent");
+
+ var version = deconcept.SWFObjectUtil.getPlayerVersion();
+ if (document.getElementById && (version['major'] > 0)) {
+ document.getElementById('flashversion').innerHTML = "You have Flash player "+ version['major'] +"."+ version['minor'] +"."+ version['rev'] +" installed.";
+ }
+
+ // ]]>
+ </script>
+
+</body>
+</html>
Index: /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.properties
===================================================================
--- /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.properties (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.properties (revision 1937)
@@ -0,0 +1,2 @@
+webapp.contextPath=/recorder
+webapp.virtualHosts=*, localhost, 127.0.0.1
Index: /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/Application.java
===================================================================
--- /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/Application.java (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/Application.java (revision 1937)
@@ -0,0 +1,49 @@
+package net.sziebert.red5.adapter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.red5.server.adapter.ApplicationAdapter;
+import org.red5.server.api.IConnection;
+
+/**
+ * <code>Application</code> is a simple <code>ApplicationAdapter</code>
+ * delegate which gets a reference to the publishing stream, plays it into a
+ * server stream and records it.
+ */
+public class Application extends ApplicationAdapter
+{
+ private static final Log log = LogFactory.getLog(Application.class);
+
+ /* ----- ApplicationAdapter delegate methods ----- */
+
+ /**
+ * Delegate method used to accept/reject incoming connection requests.
+ *
+ * @param conn
+ * @param params
+ * @return true/false
+ */
+ @Override
+ public boolean roomConnect(IConnection conn, Object[] params)
+ {
+ log.debug("New connection attempt from " + conn.getRemoteAddress() + "...");
+ // Insure that the listeners are properly attached.
+ return super.roomConnect(conn, params);
+ }
+
+ /**
+ * Delegate method which logs connection/client/user disconnections.
+ *
+ * @param conn
+ */
+ @Override
+ public void roomDisconnect(IConnection conn)
+ {
+ log.debug("Connection closed by " + conn.getRemoteAddress() + "...");
+ // Call the super class to insure that all listeners are properly
+ // dismissed.
+ super.roomDisconnect(conn);
+ }
+
+ /* ----- Application utility methods ----- */
+}
Index: /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/StreamManager.java
===================================================================
--- /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/StreamManager.java (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/src/net/sziebert/red5/adapter/StreamManager.java (revision 1937)
@@ -0,0 +1,67 @@
+package net.sziebert.red5.adapter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.red5.server.api.IConnection;
+import org.red5.server.api.stream.IServerStream;
+import org.red5.server.api.stream.support.SimplePlayItem;
+import org.red5.server.api.stream.support.StreamUtils;
+
+/**
+ * <code>StreamManager</code> provides services for snapshotting and recording
+ * the broadcast stream.
+ */
+public class StreamManager {
+ private static final Log log = LogFactory.getLog(StreamManager.class);
+
+ // Application components
+ @SuppressWarnings("unused")
+ private Application app;
+
+ /**
+ * Start recording the publishing stream for the specified
+ * <code>IConnection</code>.
+ *
+ * @param conn
+ */
+ public void recordShow(IConnection conn) {
+ log.debug("Recording show for: " + conn.getScope().getContextPath());
+ // Create the recorded stream name.
+ String streamName = conn.getScope().getContextPath() + "-" + 1;
+ // Create the server stream.
+ IServerStream stream = StreamUtils.createServerStream(conn.getScope(),
+ streamName);
+ // Create the play list and play the publishing stream into it.
+ SimplePlayItem item = new SimplePlayItem();
+ // item.setName("hostStream");
+ // stream.addItem(item);
+ // stream.start();
+ // // Set the name of the recorded stream.
+ // stream.setPublishedName(streamName);
+ // TODO: Tell the server stream to record itself.
+ }
+
+ /**
+ * Stops recording the publishing stream for the specifed
+ * <code>IConnection</code>.
+ *
+ * @param conn
+ */
+ public void stopRecordingShow(IConnection conn) {
+ log.debug("Stop recording show for: "
+ + conn.getScope().getContextPath());
+ // Create the recorded stream name.
+ String streamName = conn.getScope().getContextPath() + "-" + 1;
+ // Get the server stream.
+ IServerStream stream = StreamUtils.getServerStream(conn.getScope(),
+ streamName);
+ // TODO: Get a reference to the previously created server stream
+ // and tell it to stop recording.
+ }
+
+ /* ----- Spring injected dependencies ----- */
+
+ public void setApplication(Application app) {
+ this.app = app;
+ }
+}
Index: /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.xml
===================================================================
--- /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.xml (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/red5-web.xml (revision 1937)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value>/WEB-INF/red5-web.properties</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="web.context" class="org.red5.server.Context" autowire="byType" />
+
+ <bean id="web.scope" class="org.red5.server.WebScope" init-method="register">
+ <property name="server" ref="red5.server" />
+ <property name="parent" ref="global.scope" />
+ <property name="context" ref="web.context" />
+ <property name="handler" ref="web.handler" />
+ <property name="contextPath" value="${webapp.contextPath}" />
+ <property name="virtualHosts" value="${webapp.virtualHosts}" />
+ </bean>
+
+ <bean id="streamManager.service" class="net.sziebert.red5.adapter.StreamManager" singleton="true">
+ <property name="application" ref="web.handler" />
+ </bean>
+
+ <bean id="web.handler" class="net.sziebert.red5.adapter.Application" singleton="true" />
+
+</beans>
Index: /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/log4j.properties
===================================================================
--- /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/log4j.properties (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/log4j.properties (revision 1937)
@@ -0,0 +1,1 @@
+# logging config, this should be auto reloaded by spring.
Index: /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/web.xml
===================================================================
--- /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/web.xml (revision 1937)
+++ /java/server/branches/paul_jmx/webapps/recorder/WEB-INF/web.xml (revision 1937)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <display-name>Red5 Test Application</display-name>
+
+ <context-param>
+ <param-name>globalScope</param-name>
+ <param-value>default</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/red5-*.xml</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>locatorFactorySelector</param-name>
+ <param-value>red5.xml</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>parentContextKey</param-name>
+ <param-value>default.context</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>log4jConfigLocation</param-name>
+ <param-value>/WEB-INF/log4j.properties</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>webAppRootKey</param-name>
+ <param-value>/recorder</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+</web-app>
Index: /java/server/branches/paul_jmx/conf/log4j.properties
===================================================================
--- /java/server/branches/paul_jmx/conf/log4j.properties (revision 1931)
+++ /java/server/branches/paul_jmx/conf/log4j.properties (revision 1937)
@@ -5,4 +5,5 @@
log4j.logger.org.red5.server.Standalone=INFO
log4j.logger.org.red5.server.Client=DEBUG
+log4j.logger.org.red5.server.api.stream.support=DEBUG
log4j.logger.org.red5.server.jmx=DEBUG
log4j.logger.org.red5.server.net=INFO
Index: /java/server/branches/paul_jmx/src/org/red5/server/adapter/ApplicationAdapter.java
===================================================================
--- /java/server/branches/paul_jmx/src/org/red5/server/adapter/ApplicationAdapter.java (revision 1927)
+++ /java/server/branches/paul_jmx/src/org/red5/server/adapter/ApplicationAdapter.java (revision 1937)
@@ -3,19 +3,19 @@
/*
* RED5 Open Source Flash Server - http://www.osflash.org/red5
- *
+ *
* Copyright (c) 2006-2007 by respective authors (see below). All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation; either version 2.1 of the License, or (at your option) any later
- * version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License along
- * with this library; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -78,14 +78,14 @@
* It provides methods to work with SharedObjects and streams, as well as
* connections and scheduling services.
- *
+ *
* ApplicationAdapter is an application level IScope. To handle streaming
* processes in your application you should implement
* {@link IStreamAwareScopeHandler} interface and implement handling methods.
- *
+ *
* Application adapter provides you with useful event handlers that can be used to intercept streams,
* authorize users, etc. Also, all methods added in subclasses can be called from client side with NetConnection.call
* method. Unlike to Flash Media server which requires you to keep methods on Client object at server side, Red5
* offers much more convenient way to add methods for remote invocation to your applications.
- *
+ *
* <p><strong>EXAMPLE:</strong></p>
* <p>
@@ -95,7 +95,7 @@
* }<br />
* </code>
- *
+ *
* <p>This method added to ApplicationAdapter sublass can be called from client side with the following code:</p>
- *
+ *
* <code>
* var nc:NetConnection = new NetConnection();<br />
@@ -104,5 +104,5 @@
* </code>
*
- *
+ *
*
* <p>If you want to build a server-side framework this is a place to start and wrap it around ApplicationAdapter subclass.</p>
@@ -116,5 +116,6 @@
ISharedObjectService, IBroadcastStreamService, IOnDemandStreamService,
ISubscriberStreamService, ISchedulingService, IStreamSecurityService,
- ISharedObjectSecurityService, IStreamAwareScopeHandler {
+ ISharedObjectSecurityService, IStreamAwareScopeHandler,
+ ApplicationMBean {
/**
@@ -129,44 +130,44 @@
private Set<IApplication> listeners = new HashSet<IApplication>();
- /**
- * Scheduling service. Uses Quartz. Adds and removes scheduled jobs.
- */
- protected ISchedulingService schedulingService;
-
- /**
- * Client time to live is max allowed ping return time, in seconds
- */
- private int clientTTL = 2;
-
- /**
- * Ghost connections (disconnected users listed as connected) cleanup period in seconds
- */
- private int ghostConnsCleanupPeriod = 5;
-
- /**
- * Ghost connections cleanup job name. Needed to cancel this job.
- */
- private String ghostCleanupJobName;
-
- /**
- * List of handlers that protect stream publishing.
- */
- private Set<IStreamPublishSecurity> publishSecurity = new HashSet<IStreamPublishSecurity>();
-
- /**
- * List of handlers that protect stream playback.
- */
- private Set<IStreamPlaybackSecurity> playbackSecurity = new HashSet<IStreamPlaybackSecurity>();
-
- /**
- * List of handlers that protect shared objects.
- */
- private Set<ISharedObjectSecurity> sharedObjectSecurity = new HashSet<ISharedObjectSecurity>();
-
- /**
+ /**
+ * Scheduling service. Uses Quartz. Adds and removes scheduled jobs.
+ */
+ protected ISchedulingService schedulingService;
+
+ /**
+ * Client time to live is max allowed ping return time, in seconds
+ */
+ private int clientTTL = 2;
+
+ /**
+ * Ghost connections (disconnected users listed as connected) cleanup period in seconds
+ */
+ private int ghostConnsCleanupPeriod = 5;
+
+ /**
+ * Ghost connections cleanup job name. Needed to cancel this job.
+ */
+ private String ghostCleanupJobName;
+
+ /**
+ * List of handlers that protect stream publishing.
+ */
+ private Set<IStreamPublishSecurity> publishSecurity = new HashSet<IStreamPublishSecurity>();
+
+ /**
+ * List of handlers that protect stream playback.
+ */
+ private Set<IStreamPlaybackSecurity> playbackSecurity = new HashSet<IStreamPlaybackSecurity>();
+
+ /**
+ * List of handlers that protect shared objects.
+ */
+ private Set<ISharedObjectSecurity> sharedObjectSecurity = new HashSet<ISharedObjectSecurity>();
+
+ /**
* Register listener that will get notified about application events. Please
* note that return values (e.g. from {@link IApplication#appStart(IScope)})
* will be ignored for listeners.
- *
+ *
* @param listener
* object to register
@@ -179,5 +180,5 @@
* Unregister handler that will not get notified about application events
* any longer.
- *
+ *
* @param listener
* object to unregister
@@ -189,5 +190,5 @@
/**
* Return handlers that get notified about application events.
- *
+ *
* @return list of handlers
*/
@@ -205,5 +206,5 @@
publishSecurity.remove(handler);
}
-
+
/** {@inheritDoc} */
public Set<IStreamPublishSecurity> getStreamPublishSecurity() {
@@ -215,37 +216,37 @@
playbackSecurity.add(handler);
}
-
+
/** {@inheritDoc} */
public void unregisterStreamPlaybackSecurity(IStreamPlaybackSecurity handler) {
playbackSecurity.remove(handler);
}
-
+
/** {@inheritDoc} */
public Set<IStreamPlaybackSecurity> getStreamPlaybackSecurity() {
return playbackSecurity;
}
-
+
/** {@inheritDoc} */
public void registerSharedObjectSecurity(ISharedObjectSecurity handler) {
sharedObjectSecurity.add(handler);
}
-
+
/** {@inheritDoc} */
public void unregisterSharedObjectSecurity(ISharedObjectSecurity handler) {
sharedObjectSecurity.remove(handler);
}
-
+
/** {@inheritDoc} */
public Set<ISharedObjectSecurity> getSharedObjectSecurity() {
return sharedObjectSecurity;
}
-
+
/**
* Reject the currently connecting client without a special error message.
* This method throws {@link ClientRejectedException} exception.
*
- * @throws org.red5.server.exception.ClientRejectedException
- * Thrown when client connection must be rejected by application logic
- */
+ * @throws org.red5.server.exception.ClientRejectedException
+ * Thrown when client connection must be rejected by application logic
+ */
protected void rejectClient() throws ClientRejectedException {
throw new ClientRejectedException();
@@ -254,15 +255,15 @@
/**
* Reject the currently connecting client with an error message.
- *
+ *
* The passed object will be available as "application" property of the
- * information object that is returned to the caller.
- *
+ * information object that is returned to the caller.
+ *
* @param reason
* Additional error message to return to client-side Flex/Flash application
- *
- * @throws org.red5.server.exception.ClientRejectedException
- * Thrown when client connection must be rejected by application logic
- */
- protected void rejectClient(Object reason) throws ClientRejectedException{
+ *
+ * @throws org.red5.server.exception.ClientRejectedException
+ * Thrown when client connection must be rejected by application logic
+ */
+ protected void rejectClient(Object reason) throws ClientRejectedException {
throw new ClientRejectedException(reason);
}
@@ -275,5 +276,5 @@
* {@link ApplicationAdapter#roomConnect(IConnection, Object[])} in your
* application to make it act the way you want.
- *
+ *
* @param conn
* Connection object
@@ -306,5 +307,5 @@
/**
* Starts scope. Scope can be both application or room level.
- *
+ *
* @param scope
* Scope object
@@ -320,6 +321,7 @@
if (isApp(scope)) {
return appStart(scope);
- } else return isRoom(scope) && roomStart(scope);
- }
+ } else
+ return isRoom(scope) && roomStart(scope);
+ }
/**
@@ -327,5 +329,5 @@
* scope is room or app level scope, this method distinguishes it and acts
* accordingly.
- *
+ *
* @param conn
* Connection object
@@ -349,5 +351,5 @@
* level). This method calls {@link ApplicationAdapter#appStop(IScope)} or
* {@link ApplicationAdapter#roomStop(IScope)} handlers respectively.
- *
+ *
* @param scope
* Scope to stop
@@ -369,5 +371,5 @@
* {@link ApplicationAdapter#roomJoin(IClient, IScope)} handlers
* respectively.
- *
+ *
* @param client
* Client object
@@ -382,6 +384,7 @@
if (isApp(scope)) {
return appJoin(client, scope);
- } else return isRoom(scope) && roomJoin(client, scope);
- }
+ } else
+ return isRoom(scope) && roomJoin(client, scope);
+ }
/**
@@ -391,5 +394,5 @@
* {@link ApplicationAdapter#roomLeave(IClient, IScope)} handlers
* respectively.
- *
+ *
* @param client
* Client object
@@ -409,10 +412,10 @@
/**
- * Called once on scope (that is, application or application room) start.
+ * Called once on scope (that is, application or application room) start.
* You override {@link ApplicationAdapter#appStart(IScope)} or
* {@link ApplicationAdapter#roomStart(IScope)}} in your application to
* make it act the way you want.
- *
- * @param app Application scope object
+ *
+ * @param app Application scope object
* @return <code>true</code> if scope can be started, <code>false</code>
* otherwise
@@ -430,5 +433,5 @@
/**
* Handler method. Called when application is stopped.
- *
+ *
* @param app
* Scope object
@@ -445,5 +448,5 @@
/**
* Handler method. Called when room scope is started.
- *
+ *
* @param room
* Room scope
@@ -463,5 +466,5 @@
/**
* Handler method. Called when room scope is stopped.
- *
+ *
* @param room
* Room scope.
@@ -480,18 +483,18 @@
* IConnection object is created after call from a SWF movie) to the
* application.
- *
+ *
* You override this method to pass additional data from client to server
* application using <code>NetConnection.connect</code> method.
- *
- * <p><strong>EXAMPLE:</strong><br />
+ *
+ * <p><strong>EXAMPLE:</strong><br />
* In this simple example we pass user's skin of choice identifier from
* client to th server.</p>
- *
+ *
* <p><strong>Client-side:</strong><br />
* <code>NetConnection.connect("rtmp://localhost/killerred5app", "silver");</code></p>
- *
- * <p><strong>Server-side:</strong><br />
+ *
+ * <p><strong>Server-side:</strong><br />
* <code>if (params.length > 0) System.out.println("Theme selected: " + params[0]);</code></p>
- *
+ *
* @param conn
* Connection object
@@ -515,11 +518,11 @@
* IConnection object is created after call from a SWF movie) to the
* application.
- *
+ *
* You override this method to pass additional data from client to server
* application using <code>NetConnection.connect</code> method.
- *
+ *
* See {@link ApplicationAdapter#appConnect(IConn
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