Package org.red5.server.tomcat
Class TomcatVHostLoader
java.lang.Object
org.red5.server.LoaderBase
org.red5.server.tomcat.TomcatLoader
org.red5.server.tomcat.TomcatVHostLoader
- All Implemented Interfaces:
LoaderMXBean,ShutdownMXBean,TomcatVHostLoaderMXBean,Aware,DisposableBean,InitializingBean,ApplicationContextAware
@ManagedResource(objectName="org.red5.server:type=TomcatVHostLoader",
description="TomcatVHostLoader")
public class TomcatVHostLoader
extends TomcatLoader
implements TomcatVHostLoaderMXBean
Red5 loader for Tomcat virtual hosts.
- Author:
- Paul Gregoire ([email protected])
-
Nested Class Summary
Nested classes/interfaces inherited from class org.red5.server.tomcat.TomcatLoader
TomcatLoader.DirectoryFilter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprivate Stringprotected Stringprotected booleanprivate static org.slf4j.Loggerprotected Stringprivate ObjectNameMBean object name used for de/registration purposes.protected booleanprotected booleanprotected StringBase web applications directoryFields inherited from class org.red5.server.tomcat.TomcatLoader
connectors, defaultParentContextKey, defaultSpringConfigLocation, embedded, engine, host, hosts, realm, serviceEngineName, valvesFields inherited from class org.red5.server.LoaderBase
applicationContext, loader, red5AppCtx, webappFolder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an alias to the current host.voidaddValve(org.apache.catalina.Valve valve) Adds a valve to the current host.org.apache.catalina.HostCreate a standard host.voiddestroy()Un-initialization.booleanorg.apache.catalina.HostgetHost()Returns the current host.booleangetName()booleanbooleanprotected voidvoidremoveAlias(String alias) Removes an alias from the current host.voidremoveValve(String valveInfo) Removes a valve from the current host.voidsetAutoDeploy(boolean autoDeploy) voidsetContexts(Map<String, String> contexts) Set additional contexts.voidsetDefaultApplicationContextId(String defaultApplicationContextId) voidvoidsetLiveDeploy(boolean liveDeploy) voidvoidsetStartChildren(boolean startChildren) voidsetUnpackWARs(boolean unpackWARs) voidsetWebappRoot(String webappRoot) voidstart()Initialization.booleanstartWebApplication(String applicationName) Starts a web application and its red5 (spring) component.protected voidMethods inherited from class org.red5.server.tomcat.TomcatLoader
addContext, addContext, afterPropertiesSet, getBaseHost, getClusterNotifier, getConnectors, getEmbedded, getEngine, getHostId, getRealm, getValves, removeContext, setBaseHost, setClusterNotifier, setConnectors, setEmbedded, setHost, setHosts, setRealm, setValves, toStringMethods inherited from class org.red5.server.LoaderBase
getApplicationContext, getApplicationLoader, getRed5ApplicationContext, getRed5ApplicationContexts, removeRed5ApplicationContext, setApplicationContext, setApplicationLoader, setRed5ApplicationContext, setWebappFolderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.red5.server.jmx.mxbeans.TomcatVHostLoaderMXBean
addContext, removeContext
-
Field Details
-
log
private static org.slf4j.Logger log -
webappRoot
Base web applications directory -
name
-
domain
-
autoDeploy
protected boolean autoDeploy -
liveDeploy
protected boolean liveDeploy -
startChildren
protected boolean startChildren -
unpackWARs
protected boolean unpackWARs -
oName
MBean object name used for de/registration purposes. -
defaultApplicationContextId
-
-
Constructor Details
-
TomcatVHostLoader
public TomcatVHostLoader()
-
-
Method Details
-
start
public void start() throws jakarta.servlet.ServletExceptionInitialization.- Overrides:
startin classTomcatLoader- Throws:
jakarta.servlet.ServletException
-
destroy
Un-initialization.- Specified by:
destroyin interfaceDisposableBean- Specified by:
destroyin interfaceLoaderMXBean- Specified by:
destroyin interfaceShutdownMXBean- Overrides:
destroyin classTomcatLoader- Throws:
Exception
-
startWebApplication
Starts a web application and its red5 (spring) component. This is basically a stripped down version of init().- Specified by:
startWebApplicationin interfaceLoaderMXBean- Specified by:
startWebApplicationin interfaceTomcatVHostLoaderMXBean- Overrides:
startWebApplicationin classTomcatLoader- Returns:
- true on success
- Throws:
jakarta.servlet.ServletException
-
createHost
public org.apache.catalina.Host createHost()Create a standard host.- Returns:
- host
-
getHost
public org.apache.catalina.Host getHost()Returns the current host.- Specified by:
getHostin interfaceTomcatVHostLoaderMXBean- Overrides:
getHostin classTomcatLoader- Returns:
- host
-
addAlias
Adds an alias to the current host.- Specified by:
addAliasin interfaceTomcatVHostLoaderMXBean- Parameters:
alias- alias
-
removeAlias
Removes an alias from the current host.- Specified by:
removeAliasin interfaceTomcatVHostLoaderMXBean- Parameters:
alias- Alias
-
addValve
public void addValve(org.apache.catalina.Valve valve) Adds a valve to the current host.- Specified by:
addValvein interfaceTomcatVHostLoaderMXBean- Parameters:
valve- Valve
-
removeValve
Removes a valve from the current host.- Specified by:
removeValvein interfaceTomcatVHostLoaderMXBean- Parameters:
valveInfo- Valve Information.
-
setContexts
Set additional contexts.- Overrides:
setContextsin classTomcatLoader- Parameters:
contexts- Map of contexts- Throws:
jakarta.servlet.ServletException
-
getName
- Specified by:
getNamein interfaceTomcatVHostLoaderMXBean
-
setName
- Specified by:
setNamein interfaceTomcatVHostLoaderMXBean
-
getDomain
- Specified by:
getDomainin interfaceTomcatVHostLoaderMXBean
-
setDomain
- Specified by:
setDomainin interfaceTomcatVHostLoaderMXBean
-
getWebappRoot
- Specified by:
getWebappRootin interfaceTomcatVHostLoaderMXBean
-
setWebappRoot
- Specified by:
setWebappRootin interfaceTomcatVHostLoaderMXBean
-
getAutoDeploy
public boolean getAutoDeploy()- Specified by:
getAutoDeployin interfaceTomcatVHostLoaderMXBean
-
setAutoDeploy
public void setAutoDeploy(boolean autoDeploy) - Specified by:
setAutoDeployin interfaceTomcatVHostLoaderMXBean
-
getLiveDeploy
public boolean getLiveDeploy()- Specified by:
getLiveDeployin interfaceTomcatVHostLoaderMXBean
-
setLiveDeploy
public void setLiveDeploy(boolean liveDeploy) - Specified by:
setLiveDeployin interfaceTomcatVHostLoaderMXBean
-
getStartChildren
public boolean getStartChildren()- Specified by:
getStartChildrenin interfaceTomcatVHostLoaderMXBean
-
setStartChildren
public void setStartChildren(boolean startChildren) - Specified by:
setStartChildrenin interfaceTomcatVHostLoaderMXBean
-
getUnpackWARs
public boolean getUnpackWARs()- Specified by:
getUnpackWARsin interfaceTomcatVHostLoaderMXBean
-
setUnpackWARs
public void setUnpackWARs(boolean unpackWARs) - Specified by:
setUnpackWARsin interfaceTomcatVHostLoaderMXBean
-
getDefaultApplicationContextId
-
setDefaultApplicationContextId
-
registerJMX
protected void registerJMX()- Overrides:
registerJMXin classTomcatLoader
-
unregisterJMX
protected void unregisterJMX()- Overrides:
unregisterJMXin classTomcatLoader
-