|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.scope.BasicScope
org.red5.server.scope.Scope
org.red5.server.scope.WebScope
@ManagedResource public class WebScope
Web scope is special scope that is aware of servlet context and represents scope of a Red5 application within a servlet container (or application server) such as Tomcat, Jetty or JBoss.
Web scope is aware of virtual hosts configuration for Red5 application and is the first scope that instantiated after Red5 application gets started.
Then it loads virtual hosts configuration, adds mappings of paths to global scope that is injected thru Spring IoC context file and runs initialization process.
Red5 server implementation instance and ServletContext are injected as well.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.red5.server.scope.Scope |
---|
Scope.Builder |
Field Summary | |
---|---|
protected IApplicationContext |
appContext
The application context this webscope is running in. |
protected IApplicationLoader |
appLoader
Loader for new applications. |
protected String |
contextPath
Context path |
protected String[] |
hostnames
Hostnames |
protected static Logger |
log
Logger |
protected AtomicBoolean |
registered
Has the web scope been registered? |
protected IServer |
server
Server instance |
protected javax.servlet.ServletContext |
servletContext
Servlet context |
protected AtomicBoolean |
shuttingDown
Is the scope currently shutting down? |
protected String |
virtualHosts
Virtual hosts list as string |
Fields inherited from class org.red5.server.scope.Scope |
---|
attributes, clientStats, connectionStats, lock, oName, subscopeStats |
Fields inherited from class org.red5.server.scope.BasicScope |
---|
keepDelay, keepOnDisconnect, listeners, name, parent, persistenceClass, persistent, store, type |
Fields inherited from interface org.red5.server.api.scope.IScope |
---|
SEPARATOR |
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
CLASSPATH_ALL_URL_PREFIX |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
---|
CLASSPATH_URL_PREFIX |
Constructor Summary | |
---|---|
WebScope()
|
Method Summary | |
---|---|
IApplicationLoader |
getApplicationLoader()
Return object that can be used to load new applications. |
String |
getContextPath()
Return scope context path |
IServer |
getServer()
Return the server instance connected to this scope. |
boolean |
isShuttingDown()
Is the scope currently shutting down? |
void |
register()
Map all vhosts to global scope then initialize |
void |
setContextPath(String contextPath)
Setter for context path |
void |
setGlobalScope(IGlobalScope globalScope)
Setter for global scope. |
void |
setName()
Web scope has no name |
void |
setParent()
Can't set parent to Web scope. |
void |
setServer(IServer server)
Setter for server |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Servlet context |
void |
setVirtualHosts(String virtualHosts)
Setter for virtual hosts. |
void |
unregister()
Uninitialize and remove all vhosts from the global scope. |
Methods inherited from class org.red5.server.scope.BasicScope |
---|
addEventListener, equals, getEventListeners, getName, getStore, getType, hasEventListeners, hashCode, isValid, notifyEvent, removeEventListener, setKeepDelay |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.red5.server.jmx.mxbeans.ScopeMXBean |
---|
createChildScope, destroy, getActiveClients, getActiveConnections, getActiveSubscopes, getDepth, getEnabled, getMaxClients, getMaxConnections, getMaxSubscopes, getPath, getRunning, getServiceHandlerNames, getTotalClients, getTotalConnections, getTotalSubscopes, hasChildScope, hasChildScope, hasContext, hasHandler, hasParent, init, setAutoStart, setChildLoadPath, setDepth, setEnabled, setName, setPersistenceClass, start, stop, unregisterServiceHandler |
Methods inherited from interface org.red5.server.api.scope.IBasicScope |
---|
getName, getStore, getType, isValid, setKeepDelay |
Methods inherited from interface org.red5.server.api.event.IEventListener |
---|
notifyEvent |
Methods inherited from interface org.red5.server.api.event.IEventObservable |
---|
addEventListener, getEventListeners, removeEventListener |
Methods inherited from interface org.red5.server.api.statistics.IScopeStatistics |
---|
getName |
Field Detail |
---|
protected static Logger log
protected IServer server
protected javax.servlet.ServletContext servletContext
protected String contextPath
protected String virtualHosts
protected String[] hostnames
protected AtomicBoolean registered
protected IApplicationContext appContext
protected IApplicationLoader appLoader
protected AtomicBoolean shuttingDown
Constructor Detail |
---|
public WebScope()
Method Detail |
---|
public void setGlobalScope(IGlobalScope globalScope)
globalScope
- Red5 global scopepublic void setName()
public void setParent()
public void setServer(IServer server)
server
- Server instancepublic void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext
in interface ServletContextAware
servletContext
- Servlet contextpublic void setContextPath(String contextPath)
setContextPath
in interface WebScopeMXBean
contextPath
- Context pathpublic String getContextPath()
getContextPath
in interface IScope
getContextPath
in interface ScopeMXBean
getContextPath
in class Scope
public void setVirtualHosts(String virtualHosts)
setVirtualHosts
in interface WebScopeMXBean
virtualHosts
- Virtual hosts list as stringpublic void register()
register
in interface WebScopeMXBean
public void unregister()
unregister
in interface WebScopeMXBean
public IServer getServer()
getServer
in class Scope
public IApplicationLoader getApplicationLoader()
public boolean isShuttingDown()
isShuttingDown
in interface WebScopeMXBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |