Standalone server
Should be inside "red5-web.xml" in WEB-INF?
What's the usage of webAppRootKey?
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>/myapp</param-value>
</context-param>
Default scope: The default scope usually has the name web.scope, but the name can be chosen arbitrarily.
<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="/myapp" />
<property name="virtualHosts" value="localhost, 127.0.0.1" />
</bean>
Scope refer to context and handler (different from service)
Context: the context bean has the reserved name web.context and is used to map paths to scopes, lookup services and handlers. The default class for this is org.red5.server.Context.
<bean id="web.context" class="org.red5.server.Context" autowire="byType"/>
Handler: every context needs a handler that implements the methods (IScopeHandler) called when a client connects to the scope, leaves it and that contains additional methods that can be called by the client.
<bean id="web.handler" class="org.red5.server.adapter.ApplicationAdapter" singleton="true" />
Integrated in tomcat
"xxx-context.xml" in classpath will be loaded automatically?
What's the usage of globalScope, contextConfigLocation, parentContextKey, log4jConfigLocation?
<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/classes/*-web.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>
References the context listener servlet of the application, this technically takes the place of the Standalone.class in a standard Red5 server
<listener>
<!-- Impersonates a org.springframework.web.context.ContextLoaderListener -->
<listener-class>org.red5.server.MainServlet</listener-class>
</listener>
Every application can only have one context and they should follow this naming convention '<application name>.context' so that they will not conflict with one another?
Multiple language support is achieved by passing a script file name and a list of implemented interface to script factory, so that is can dynamically create a java class which implements IScopeHandler (or maybe some service interface).
<bean id="web.handler" class="org.red5.server.script.groovy.GroovyScriptFactory">
<constructor-arg index="0" value="classpath:applications/main.groovy"/>
<constructor-arg index="1">
<list>
<value>org.red5.server.api.IScopeHandler</value>
<value>org.red5.server.adapter.IApplication</value>
</list>
</constructor-arg>
</bean>
RTMPT basically is a HTTP wrapper around the RTMP protocol that is sent using POST requests from the client to the server. Because of the non-persistent nature of HTTP connections, RTMPT requires the clients to poll for updates periodically in order to get notified about events that are generated by the server or other clients.
URL should be http://server/<comand>/[<client>/]<index>
Commands: Initial connect (command "open"), Client updates (command "send"), Polling requests (command "idle"), Disconnect of a session (command "close")
Client: specifies the id of the client that performs the requests (only sent for established sessions)
Index: is a consecutive number that seems to be used to detect missing packages
Polling interval: first byte of the response data controls the polling interval of the client, the server always starts with a value of 0x01 after data was returned and increases it after 10 emtpy replies. The maximum delay is 0x21 which causes a delay of approximately 0.5 seconds between two requests.
WebScope scope = (WebScope)appFactory.getBean("web.scope");
scope.setServer(server); // when the server created?
scope.setParent(global); // what about global scope?
scope.register();
scope.start(); // starts a scope? but isn't is starts automatically when a request comes?
"red5.server" and "global.scope" bean?
分享到:
相关推荐
"RHCSA/RHCE Red Hat Linux Certification Study Guide, Seventh Edition"知识点总结 本书是Red Hat Linux认证考试的学习指导手册,第七版,涵盖了RHCSA和RHCE考试的所有内容。下面是本书的知识点总结: 一、Red ...
Sybex - RHCE Red Hat Certified Engineer Study Guide
2. **POSIX用户和组映射**:依据RFC2307,将Active Directory中的用户和组信息映射到AIX的POSIX目录结构中,实现了统一的用户管理。 3. **SPNEGO协议**:利用RFC2478定义的SPNEGO协议,允许Web应用服务器在用户...
Red Hat Linux9普通版.pdf
RHCE Red Hat Certified Engineer Linux Study Guide Exam RH302 4 ED 2004
Like many in the Linux community, you’ve probably heard of the Red Hat Certified Engineer (RHCE) program and the related RHCE exam, both of which were created by Red Hat, Inc. You may have heard that...
RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302), Fifth Edition byMichael Jang McGraw-Hill/Osborne 2007 (896 pages) ISBN:9780072264548 With hundreds of practice questions and hands...
McGraw.Hill.RHCE.Red.Hat.Certified.Engineer.Linux.Study.Guide.Exam.RH302.5th.Edition.Jun.2007.part2.rar
McGraw.Hill.RHCE.Red.Hat.Certified.Engineer.Linux.Study.Guide.Exam.RH302.fifth.Edition.Jun.2007.part1.rar
- **链式操作**: jQuery的对象返回总是自身,这使得多个方法调用可以连在一起,如`$("#myDiv").css("color", "red").fadeIn(500);`。 - **动画效果**: jQuery提供了丰富的动画效果,如`fadeIn()`, `fadeOut()`, `...
已经编辑好的直接打印版PDF文件。 整篇文档由原PDF版本的889页缩减到463页,主体内容完整无删减。 单数页和双数页页边距进行了调整,提供正反面打印后的装订边距。 去掉了原版PDF中最后多余的索引部分。...
rhcsa/rhce7
《RHCE Linux Study Guide 经典教材》是针对Red Hat Certified Engineer(RHCE)认证的一份详尽学习指南。这份教材旨在帮助考生掌握Linux系统管理的核心技能,为参加RHCE考试做好充分准备。RHCE认证是Linux领域内极...
This study guide will help you to prepare for Linux/Unix Exam RH300, Red Hat Certified Engineer. Exam topics include Hardware and Installation, Configuration and Administration, Kernel Services, ...
每个属性都有相应的值,如颜色值(`red`、`#ff0000`或`rgba(255, 0, 0, 0.5)`)。 3. 嵌套与继承:CSS允许嵌套规则,使代码更有序。同时,子元素会继承父元素的一些样式,但某些属性(如`display`)不支持继承。 4...
4. **链式操作**: jQuery方法返回的是jQuery对象本身,所以可以连续调用多个方法,如`$('div').css('color', 'red').fadeIn(500)`。 ### 二、jQuery动画 1. **基本动画**: `fadeIn()`, `fadeOut()`, `slideToggle...
A light purplish red sapphire is heat treated in an airtight crucible. The sample changes little in color after receiving heat treatment at 1100°C, but turns to light blue and blue after being ...
在本压缩包“Matlab series -- Matlab study demos. 数字图像处理课程学习的代码存档。”中,包含的是一个用于数字图像处理课程学习的Matlab代码集合。Matlab是一款强大的数学计算软件,广泛应用于科学研究、工程...