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 (mondain@gmail.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.red5.server.tomcat.TomcatLoader
TomcatLoader.DirectoryFilter
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private String
protected String
protected boolean
private static org.slf4j.Logger
protected String
private ObjectName
MBean object name used for de/registration purposes.protected boolean
protected boolean
protected String
Base web applications directoryFields inherited from class org.red5.server.tomcat.TomcatLoader
connectors, defaultParentContextKey, defaultSpringConfigLocation, embedded, engine, host, hosts, realm, serviceEngineName, valves
Fields inherited from class org.red5.server.LoaderBase
applicationContext, loader, red5AppCtx, webappFolder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an alias to the current host.void
addValve
(org.apache.catalina.Valve valve) Adds a valve to the current host.org.apache.catalina.Host
Create a standard host.void
destroy()
Un-initialization.boolean
org.apache.catalina.Host
getHost()
Returns the current host.boolean
getName()
boolean
boolean
protected void
void
removeAlias
(String alias) Removes an alias from the current host.void
removeValve
(String valveInfo) Removes a valve from the current host.void
setAutoDeploy
(boolean autoDeploy) void
setContexts
(Map<String, String> contexts) Set additional contexts.void
setDefaultApplicationContextId
(String defaultApplicationContextId) void
void
setLiveDeploy
(boolean liveDeploy) void
void
setStartChildren
(boolean startChildren) void
setUnpackWARs
(boolean unpackWARs) void
setWebappRoot
(String webappRoot) void
start()
Initialization.boolean
startWebApplication
(String applicationName) Starts a web application and its red5 (spring) component.protected void
Methods inherited from class org.red5.server.tomcat.TomcatLoader
addContext, addContext, afterPropertiesSet, getBaseHost, getConnectors, getEmbedded, getEngine, getHostId, getRealm, removeContext, setBaseHost, setConnectors, setEmbedded, setHost, setHosts, setRealm, setValves, toString
Methods inherited from class org.red5.server.LoaderBase
getApplicationContext, getApplicationLoader, getRed5ApplicationContext, getRed5ApplicationContexts, removeRed5ApplicationContext, setApplicationContext, setApplicationLoader, setRed5ApplicationContext, setWebappFolder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
start
in classTomcatLoader
- Throws:
jakarta.servlet.ServletException
-
destroy
Un-initialization.- Specified by:
destroy
in interfaceDisposableBean
- Specified by:
destroy
in interfaceLoaderMXBean
- Specified by:
destroy
in interfaceShutdownMXBean
- Overrides:
destroy
in classTomcatLoader
- Throws:
Exception
-
startWebApplication
Starts a web application and its red5 (spring) component. This is basically a stripped down version of init().- Specified by:
startWebApplication
in interfaceLoaderMXBean
- Specified by:
startWebApplication
in interfaceTomcatVHostLoaderMXBean
- Overrides:
startWebApplication
in 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:
getHost
in interfaceTomcatVHostLoaderMXBean
- Overrides:
getHost
in classTomcatLoader
- Returns:
- host
-
addAlias
Adds an alias to the current host.- Specified by:
addAlias
in interfaceTomcatVHostLoaderMXBean
- Parameters:
alias
- alias
-
removeAlias
Removes an alias from the current host.- Specified by:
removeAlias
in interfaceTomcatVHostLoaderMXBean
- Parameters:
alias
- Alias
-
addValve
public void addValve(org.apache.catalina.Valve valve) Adds a valve to the current host.- Specified by:
addValve
in interfaceTomcatVHostLoaderMXBean
- Parameters:
valve
- Valve
-
removeValve
Removes a valve from the current host.- Specified by:
removeValve
in interfaceTomcatVHostLoaderMXBean
- Parameters:
valveInfo
- Valve Information.
-
setContexts
Set additional contexts.- Overrides:
setContexts
in classTomcatLoader
- Parameters:
contexts
- Map of contexts- Throws:
jakarta.servlet.ServletException
-
getName
- Specified by:
getName
in interfaceTomcatVHostLoaderMXBean
-
setName
- Specified by:
setName
in interfaceTomcatVHostLoaderMXBean
-
getDomain
- Specified by:
getDomain
in interfaceTomcatVHostLoaderMXBean
-
setDomain
- Specified by:
setDomain
in interfaceTomcatVHostLoaderMXBean
-
getWebappRoot
- Specified by:
getWebappRoot
in interfaceTomcatVHostLoaderMXBean
-
setWebappRoot
- Specified by:
setWebappRoot
in interfaceTomcatVHostLoaderMXBean
-
getAutoDeploy
public boolean getAutoDeploy()- Specified by:
getAutoDeploy
in interfaceTomcatVHostLoaderMXBean
-
setAutoDeploy
public void setAutoDeploy(boolean autoDeploy) - Specified by:
setAutoDeploy
in interfaceTomcatVHostLoaderMXBean
-
getLiveDeploy
public boolean getLiveDeploy()- Specified by:
getLiveDeploy
in interfaceTomcatVHostLoaderMXBean
-
setLiveDeploy
public void setLiveDeploy(boolean liveDeploy) - Specified by:
setLiveDeploy
in interfaceTomcatVHostLoaderMXBean
-
getStartChildren
public boolean getStartChildren()- Specified by:
getStartChildren
in interfaceTomcatVHostLoaderMXBean
-
setStartChildren
public void setStartChildren(boolean startChildren) - Specified by:
setStartChildren
in interfaceTomcatVHostLoaderMXBean
-
getUnpackWARs
public boolean getUnpackWARs()- Specified by:
getUnpackWARs
in interfaceTomcatVHostLoaderMXBean
-
setUnpackWARs
public void setUnpackWARs(boolean unpackWARs) - Specified by:
setUnpackWARs
in interfaceTomcatVHostLoaderMXBean
-
getDefaultApplicationContextId
-
setDefaultApplicationContextId
-
registerJMX
protected void registerJMX()- Overrides:
registerJMX
in classTomcatLoader
-
unregisterJMX
protected void unregisterJMX()- Overrides:
unregisterJMX
in classTomcatLoader
-