Package org.red5.server.tomcat
Class TomcatApplicationLoader
java.lang.Object
org.red5.server.tomcat.TomcatApplicationLoader
- All Implemented Interfaces:
IApplicationLoader
Class that can load new applications in Tomcat.
- Author:
- The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de)
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.catalina.startup.Tomcat
Store reference to embedded Tomcat engine.private org.apache.catalina.Host
Store reference to host Tomcat is running on.protected static org.slf4j.Logger
private ApplicationContext
Stores reference to the root ApplicationContext. -
Constructor Summary
ModifierConstructorDescriptionprotected
TomcatApplicationLoader
(org.apache.catalina.startup.Tomcat embedded, org.apache.catalina.Host host, ApplicationContext rootCtx) Wrap Tomcat engine and host. -
Method Summary
Modifier and TypeMethodDescriptionReturn the rootApplicationContext
.void
loadApplication
(String contextPath, String virtualHosts, String directory) Load a new application for the given context path from a directory.
-
Field Details
-
log
protected static org.slf4j.Logger log -
embedded
private org.apache.catalina.startup.Tomcat embeddedStore reference to embedded Tomcat engine. -
host
private org.apache.catalina.Host hostStore reference to host Tomcat is running on. -
rootCtx
Stores reference to the root ApplicationContext.
-
-
Constructor Details
-
TomcatApplicationLoader
protected TomcatApplicationLoader(org.apache.catalina.startup.Tomcat embedded, org.apache.catalina.Host host, ApplicationContext rootCtx) Wrap Tomcat engine and host.- Parameters:
embedded
-host
-
-
-
Method Details
-
getRootContext
Return the rootApplicationContext
.- Specified by:
getRootContext
in interfaceIApplicationLoader
- Returns:
- application context
-
loadApplication
public void loadApplication(String contextPath, String virtualHosts, String directory) throws Exception Load a new application for the given context path from a directory.- Specified by:
loadApplication
in interfaceIApplicationLoader
- Parameters:
contextPath
- context pathvirtualHosts
- virtual hostsdirectory
- directory- Throws:
Exception
- for fun
-